diff options
Diffstat (limited to 'src/lib/libc/stdlib/malloc.c')
| -rw-r--r-- | src/lib/libc/stdlib/malloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 9d9c69ad00..12cc67083d 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.27 1997/07/02 16:26:27 millert Exp $"; | 11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.28 1997/08/22 17:06:59 deraadt Exp $"; |
| 12 | #endif /* LIBC_SCCS and not lint */ | 12 | #endif /* LIBC_SCCS and not lint */ |
| 13 | 13 | ||
| 14 | /* | 14 | /* |
| @@ -478,6 +478,7 @@ malloc_init () | |||
| 478 | { | 478 | { |
| 479 | char *p, b[64]; | 479 | char *p, b[64]; |
| 480 | int i, j; | 480 | int i, j; |
| 481 | int save_errno = errno; | ||
| 481 | 482 | ||
| 482 | THREAD_LOCK_INIT(); | 483 | THREAD_LOCK_INIT(); |
| 483 | 484 | ||
| @@ -584,7 +585,7 @@ malloc_init () | |||
| 584 | * We can sbrk(2) further back when we keep this on a low address. | 585 | * We can sbrk(2) further back when we keep this on a low address. |
| 585 | */ | 586 | */ |
| 586 | px = (struct pgfree *) imalloc (sizeof *px); | 587 | px = (struct pgfree *) imalloc (sizeof *px); |
| 587 | 588 | errno = save_errno; | |
| 588 | } | 589 | } |
| 589 | 590 | ||
| 590 | /* | 591 | /* |
