From 040531292147e8e4847d6c666746a426403d0cf5 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Fri, 20 Dec 2013 15:52:01 -0800 Subject: [PATCH] Fix an uninitialized variable read in xallocx(). --- src/jemalloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jemalloc.c b/src/jemalloc.c index b8a4fb07..5845fe9a 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; }