From b2d280038f97111144ce8aeb8ec293510b6b8e21 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Wed, 19 Oct 2016 07:31:46 -0700 Subject: 39680: correctly handle case of popping last arena This mattered only when compiling with --enable-stack-allocation because otherwise the heap was never completely empty. --- Src/mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/mem.c') diff --git a/Src/mem.c b/Src/mem.c index a1744c6d9..8c7eb8017 100644 --- a/Src/mem.c +++ b/Src/mem.c @@ -497,7 +497,8 @@ popheap(void) continue; } h->next = NULL; - } + } else if (hl == h) /* This is the last arena of all */ + hl = NULL; #ifdef USE_MMAP munmap((void *) h, h->size); #else -- cgit 1.4.1