summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-10-14 22:17:28 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-10-14 22:17:28 +0000
commita278286f2c868a33ca9b9d99e394502a0a155172 (patch)
tree422c2ecc701d4fca93cbb6451e5a9e250b0c52cf /lib/libc
parentf662dbc148f2e88d1a8a758b1f3e61e40329a362 (diff)
zero out the page
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/db/hash/hash_buf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/db/hash/hash_buf.c b/lib/libc/db/hash/hash_buf.c
index e955102501a..225d665787f 100644
--- a/lib/libc/db/hash/hash_buf.c
+++ b/lib/libc/db/hash/hash_buf.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: hash_buf.c,v 1.3 1996/08/19 08:20:35 tholo Exp $";
+static char rcsid[] = "$OpenBSD: hash_buf.c,v 1.4 1996/10/14 22:17:27 downsj Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -331,8 +331,10 @@ __buf_free(hashp, do_free, to_disk)
}
/* Check if we are freeing stuff */
if (do_free) {
- if (bp->page)
+ if (bp->page) {
+ (void)memset(bp->page, 0, hashp->BSIZE);
free(bp->page);
+ }
BUF_REMOVE(bp);
free(bp);
bp = LRU;