diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index f5704754..ffb74717 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c @@ -8,7 +8,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: malloc.c,v 1.66 2004/02/19 23:20:53 tdeval Exp $"; +static char rcsid[] = "$OpenBSD: malloc.c,v 1.67 2004/04/12 09:25:11 tdeval Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -228,6 +228,9 @@ void utrace(struct ut *, int); #define UTRACE(a,b,c) #endif +/* Status of malloc. */ +static int malloc_active; + /* my last break. */ static void *malloc_brk; @@ -335,6 +338,7 @@ wrterror(char *p) if (malloc_stats) malloc_dump(stderr); #endif /* MALLOC_STATS */ + malloc_active--; abort(); } @@ -1243,8 +1247,6 @@ ifree(void *ptr) return; } -static int malloc_active; - /* * Common function for handling recursion. Only * print the error message once, to avoid making the problem