[3.0] f6f75ea Fix varnishd segfault in jemalloc's arena_dalloc()

Lasse Karstensen lkarsten at varnish-software.com
Wed Mar 12 14:05:42 CET 2014


commit f6f75eac911a433f86ce28df9f2a8f489eed3503
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date:   Wed Mar 12 13:26:10 2014 +0100

    Fix varnishd segfault in jemalloc's arena_dalloc()
    
    Merging tiny patch from:
    
        http://lists.freebsd.org/pipermail/freebsd-current/2010-January/015138.html
    
    Fixes: #1448

diff --git a/lib/libjemalloc/malloc.c b/lib/libjemalloc/malloc.c
index 56d8a98..d007523 100644
--- a/lib/libjemalloc/malloc.c
+++ b/lib/libjemalloc/malloc.c
@@ -3874,6 +3874,7 @@ arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr)
 					arena_dalloc_small(arena, chunk, ptr,
 					    mapelm);
 					malloc_spin_unlock(&arena->lock);
+					return;
 				}
 				mag_rack = rack;
 			}



More information about the varnish-commit mailing list