diff options
Diffstat (limited to 'libc/stdlib/malloc/heap_free.c')
-rw-r--r-- | libc/stdlib/malloc/heap_free.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libc/stdlib/malloc/heap_free.c b/libc/stdlib/malloc/heap_free.c index d8eaf7e66..ac7e00be3 100644 --- a/libc/stdlib/malloc/heap_free.c +++ b/libc/stdlib/malloc/heap_free.c @@ -17,7 +17,7 @@ /* Return the memory area MEM of size SIZE to HEAP. */ -void +struct heap_free_area * __heap_free (struct heap *heap, void *mem, size_t size) { struct heap_free_area *prev_fa, *fa, *new_fa; @@ -120,8 +120,12 @@ __heap_free (struct heap *heap, void *mem, size_t size) if (fa) fa->prev = new_fa; + fa = new_fa; + done: HEAP_DEBUG (heap, "after __heap_free"); __heap_unlock (heap); + + return fa; } |