diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-05-01 22:09:48 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-05-02 13:39:36 +1000 |
commit | d1c6b7fdbdfe4a7a37ecd48a97f0796b061c2868 (patch) | |
tree | 24ca5e459bd32011d59cc57d2056036b3c610e53 /bitmap.c | |
parent | 0f163983016c2988a92e039d18a7569f9ea8e071 (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -53,8 +53,9 @@ void | |||
53 | bitmap_free(struct bitmap *b) | 53 | bitmap_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 | } |