summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordownsj <downsj@openbsd.org>1996-10-14 22:17:27 +0000
committerdownsj <downsj@openbsd.org>1996-10-14 22:17:27 +0000
commit1f4695f0dfc43aef0eb0fb20016c02e9576df4b5 (patch)
tree519b1e82918e06b17a48806d399be5ee961aedfc
parentvital fixes. From Kenneth Stailey (kstailey@dol-esa.gov) (diff)
downloadwireguard-openbsd-1f4695f0dfc43aef0eb0fb20016c02e9576df4b5.tar.xz
wireguard-openbsd-1f4695f0dfc43aef0eb0fb20016c02e9576df4b5.zip
zero out the page
-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;