summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMiles Bader <miles@lsi.nec.co.jp>2003-04-02 06:40:43 +0000
committerMiles Bader <miles@lsi.nec.co.jp>2003-04-02 06:40:43 +0000
commitf3b60effac147fdae8c10a33cf213df65e0274ae (patch)
treede8874f0a4fcf3443543c4bc4b26f70171dc0db0 /libc
parent58fe14cdfa36be501ea14fb3ae0c182b2f30da86 (diff)
(free_to_heap): Unlock the heap before returning in the
__UCLIBC_UCLINUX_BROKEN_MUNMAP__ case. Fix from YYang1@Winbond.com.tw.
Diffstat (limited to 'libc')
-rw-r--r--libc/stdlib/malloc/free.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/stdlib/malloc/free.c b/libc/stdlib/malloc/free.c
index 3b2ec651e..88684e6df 100644
--- a/libc/stdlib/malloc/free.c
+++ b/libc/stdlib/malloc/free.c
@@ -1,8 +1,8 @@
/*
* libc/stdlib/malloc/free.c -- free function
*
- * Copyright (C) 2002 NEC Corporation
- * Copyright (C) 2002 Miles Bader <miles@gnu.org>
+ * Copyright (C) 2002,03 NEC Electronics Corporation
+ * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License. See the file COPYING.LIB in the main
@@ -210,6 +210,9 @@ free_to_heap (void *mem, struct heap *heap)
__heap_free (heap, (void *)start, end - start);
}
+ /* Finally release the lock for good. */
+ __heap_unlock (heap);
+
MALLOC_MMB_DEBUG_INDENT (-1);
# else /* !__UCLIBC_UCLINUX_BROKEN_MUNMAP__ */