diff options
Diffstat (limited to 'src/lib/libc/stdlib/malloc.c')
| -rw-r--r-- | src/lib/libc/stdlib/malloc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index f5704754a0..ffb74717e2 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #if defined(LIBC_SCCS) && !defined(lint) | 10 | #if defined(LIBC_SCCS) && !defined(lint) |
| 11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.66 2004/02/19 23:20:53 tdeval Exp $"; | 11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.67 2004/04/12 09:25:11 tdeval Exp $"; |
| 12 | #endif /* LIBC_SCCS and not lint */ | 12 | #endif /* LIBC_SCCS and not lint */ |
| 13 | 13 | ||
| 14 | /* | 14 | /* |
| @@ -228,6 +228,9 @@ void utrace(struct ut *, int); | |||
| 228 | #define UTRACE(a,b,c) | 228 | #define UTRACE(a,b,c) |
| 229 | #endif | 229 | #endif |
| 230 | 230 | ||
| 231 | /* Status of malloc. */ | ||
| 232 | static int malloc_active; | ||
| 233 | |||
| 231 | /* my last break. */ | 234 | /* my last break. */ |
| 232 | static void *malloc_brk; | 235 | static void *malloc_brk; |
| 233 | 236 | ||
| @@ -335,6 +338,7 @@ wrterror(char *p) | |||
| 335 | if (malloc_stats) | 338 | if (malloc_stats) |
| 336 | malloc_dump(stderr); | 339 | malloc_dump(stderr); |
| 337 | #endif /* MALLOC_STATS */ | 340 | #endif /* MALLOC_STATS */ |
| 341 | malloc_active--; | ||
| 338 | abort(); | 342 | abort(); |
| 339 | } | 343 | } |
| 340 | 344 | ||
| @@ -1243,8 +1247,6 @@ ifree(void *ptr) | |||
| 1243 | return; | 1247 | return; |
| 1244 | } | 1248 | } |
| 1245 | 1249 | ||
| 1246 | static int malloc_active; | ||
| 1247 | |||
| 1248 | /* | 1250 | /* |
| 1249 | * Common function for handling recursion. Only | 1251 | * Common function for handling recursion. Only |
| 1250 | * print the error message once, to avoid making the problem | 1252 | * print the error message once, to avoid making the problem |
