diff options
Diffstat (limited to 'src/lib/libc/stdlib/malloc.c')
| -rw-r--r-- | src/lib/libc/stdlib/malloc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 5a67042333..f5704754a0 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.65 2003/11/19 02:27:18 tedu Exp $"; | 11 | static char rcsid[] = "$OpenBSD: malloc.c,v 1.66 2004/02/19 23:20:53 tdeval Exp $"; |
| 12 | #endif /* LIBC_SCCS and not lint */ | 12 | #endif /* LIBC_SCCS and not lint */ |
| 13 | 13 | ||
| 14 | /* | 14 | /* |
| @@ -1028,7 +1028,10 @@ free_pages(void *ptr, u_long index, struct pginfo *info) | |||
| 1028 | madvise(ptr, l, MADV_FREE); | 1028 | madvise(ptr, l, MADV_FREE); |
| 1029 | #endif | 1029 | #endif |
| 1030 | 1030 | ||
| 1031 | l += malloc_guard; | 1031 | if (malloc_guard) { |
| 1032 | page_dir[index + i] = MALLOC_FREE; | ||
| 1033 | l += malloc_guard; | ||
| 1034 | } | ||
| 1032 | tail = (char *)ptr+l; | 1035 | tail = (char *)ptr+l; |
| 1033 | 1036 | ||
| 1034 | if (malloc_freeprot) | 1037 | if (malloc_freeprot) |
