Explorar o código

(free_to_heap): Unlock the heap before returning in the
__UCLIBC_UCLINUX_BROKEN_MUNMAP__ case. Fix from YYang1@Winbond.com.tw.

Miles Bader %!s(int64=21) %!d(string=hai) anos
pai
achega
f3b60effac
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      libc/stdlib/malloc/free.c

+ 5 - 2
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__ */