diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-12-19 14:02:14 -0800 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-12-19 14:03:00 -0800 |
commit | 875d11eec5df38bae0003df4a884ef962cf28590 (patch) | |
tree | 83667b7ab2470a3aba40fb9ee868784d77d7e900 /libc/stdlib/malloc/free.c | |
parent | f3217f9be3225c4943677d03b274cbc0cb4ed228 (diff) | |
parent | 23528282b771d1af3df0fa17f1e909ad3b663f59 (diff) |
Merge commit 'origin/master' into nptl
Conflicts:
libc/signal/sigpause.c
libc/string/x86_64/memset.S
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/stdlib/malloc/free.c')
-rw-r--r-- | libc/stdlib/malloc/free.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/stdlib/malloc/free.c b/libc/stdlib/malloc/free.c index c17e7ec2a..e7b6a290a 100644 --- a/libc/stdlib/malloc/free.c +++ b/libc/stdlib/malloc/free.c @@ -177,14 +177,14 @@ __free_to_heap (void *mem, struct heap_free_area **heap /* Start searching again from the end of this block. */ start = mmb_end; + /* Release the descriptor block we used. */ + free_to_heap (mmb, &__malloc_mmb_heap, &__malloc_mmb_heap_lock); + /* We have to unlock the heap before we recurse to free the mmb descriptor, because we might be unmapping from the mmb heap. */ __heap_unlock (heap_lock); - /* Release the descriptor block we used. */ - free_to_heap (mmb, &__malloc_mmb_heap, &__malloc_mmb_heap_lock); - /* Do the actual munmap. */ munmap ((void *)mmb_start, mmb_end - mmb_start); |