summaryrefslogtreecommitdiff
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 f95032250..3d7aa1379 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -53,8 +53,9 @@ void
53bitmap_free(struct bitmap *b) 53bitmap_free(struct bitmap *b)
54{ 54{
55 if (b != NULL && b->d != NULL) { 55 if (b != NULL && b->d != NULL) {
56 explicit_bzero(b->d, b->len); 56 bitmap_zero(b);
57 free(b->d); 57 free(b->d);
58 b->d = NULL;
58 } 59 }
59 free(b); 60 free(b);
60} 61}