From 3762647250380394ac23faf8345f6f6901304624 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Fri, 28 Dec 2007 02:15:08 +0000 Subject: [PATCH] Release chunks_mtx for all paths through chunk_dealloc(). Reported by: kris --- lib/libc/stdlib/malloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 9852ba6c7991..79ceb4b1cc50 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1773,13 +1773,16 @@ chunk_dealloc(void *chunk, size_t size) #ifdef MALLOC_DSS if (opt_dss) { if (chunk_dealloc_dss(chunk, size) == false) - return; + goto RETURN; } if (opt_mmap) #endif chunk_dealloc_mmap(chunk, size); +#ifdef MALLOC_DSS +RETURN: +#endif #ifdef MALLOC_STATS stats_chunks.curchunks -= (size / chunksize); #endif