summaryrefslogtreecommitdiffstats
path: root/bitmap.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-05-01 22:09:48 +0000
committerDamien Miller <djm@mindrot.org>2017-05-02 13:39:36 +1000
commitd1c6b7fdbdfe4a7a37ecd48a97f0796b061c2868 (patch)
tree24ca5e459bd32011d59cc57d2056036b3c610e53 /bitmap.c
parent0f163983016c2988a92e039d18a7569f9ea8e071 (diff)
upstream commit
when freeing a bitmap, zero all it bytes; spotted by Ilya Kaliman Upstream-ID: 834ac024f2c82389d6ea6b1c7d6701b3836e28e4
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitmap.c b/bitmap.c
index f9503225..3d7aa137 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -53,8 +53,9 @@ void
bitmap_free(struct bitmap *b)
{
if (b != NULL && b->d != NULL) {
- explicit_bzero(b->d, b->len);
+ bitmap_zero(b);
free(b->d);
+ b->d = NULL;
}
free(b);
}