summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther@openbsd.org <guenther@openbsd.org>2015-09-11 08:50:04 +0000
committerDamien Miller <djm@mindrot.org>2016-01-14 12:10:41 +1100
commit8f5b93026797b9f7fba90d0c717570421ccebbd3 (patch)
treeab27cb0e3bef4a9ca632489696c25e4fd51a1e20
parentd77148e3a3ef6c29b26ec74331455394581aa257 (diff)
upstream commit
Use explicit_bzero() when zeroing before free() from Michael McConville (mmcconv1 (at) sccs.swarthmore.edu) ok millert@ djm@ Upstream-ID: 2e3337db046c3fe70c7369ee31515ac73ec00f50
-rw-r--r--bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitmap.c b/bitmap.c
index 19cd2e8e..f9503225 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -53,7 +53,7 @@ void
bitmap_free(struct bitmap *b)
{
if (b != NULL && b->d != NULL) {
- memset(b->d, 0, b->len);
+ explicit_bzero(b->d, b->len);
free(b->d);
}
free(b);