summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2013-12-20 23:52:01 (GMT)
committerJason Evans <je@fb.com>2013-12-20 23:52:01 (GMT)
commit040531292147e8e4847d6c666746a426403d0cf5 (patch)
tree3fc0c7f6c4b045c8049048cf743aa149071ea404
parent0a8696658f8135ae39eeb86e57f7cecc01144894 (diff)
downloadjemalloc-040531292147e8e4847d6c666746a426403d0cf5.zip
jemalloc-040531292147e8e4847d6c666746a426403d0cf5.tar.gz
jemalloc-040531292147e8e4847d6c666746a426403d0cf5.tar.bz2
Fix an uninitialized variable read in xallocx().
-rw-r--r--src/jemalloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c
index b8a4fb0..5845fe9 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -1625,6 +1625,9 @@ je_xallocx(void *ptr, size_t size, size_t extra, int flags)
}
if (iralloct(ptr, size, extra, alignment, zero, true,
try_tcache_alloc, try_tcache_dalloc, arena) == NULL) {
+ if (config_stats == false && (config_valgrind == false
+ || opt_valgrind == false))
+ old_usize = isalloc(ptr, false);
usize = old_usize;
goto label_not_moved;
}