diff options
-rw-r--r-- | lib/libc/stdlib/malloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 2234bd64a8e..6fae6fe5651 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -8,7 +8,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: malloc.c,v 1.45 2001/12/05 22:54:01 tdeval Exp $"; +static char rcsid[] = "$OpenBSD: malloc.c,v 1.46 2002/01/23 20:42:24 fgsch Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -1248,6 +1248,7 @@ malloc(size_t size) if (malloc_active++) { wrtwarning("recursive call.\n"); malloc_active--; + THREAD_UNLOCK(); return (0); } r = imalloc(size); @@ -1287,6 +1288,7 @@ realloc(void *ptr, size_t size) if (malloc_active++) { wrtwarning("recursive call.\n"); malloc_active--; + THREAD_UNLOCK(); return (0); } if (!ptr) { |