diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-04-17 16:53:37 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-04-17 16:53:37 -0400 |
| commit | 193848fff6bc4ce978f531178f54d2b65ff8960f (patch) | |
| tree | 7a6e51ca0c477323d245c8986c1db416c2ee8922 /lib/bitfield.h | |
| parent | 4110aa2cb342fb0f025746c4b7df7707f69334c5 (diff) | |
lib: clear data pointer in bf_free
Help avoid double-free by clearing data pointer.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/bitfield.h')
| -rw-r--r-- | lib/bitfield.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bitfield.h b/lib/bitfield.h index eebfc049d9..2d98760df7 100644 --- a/lib/bitfield.h +++ b/lib/bitfield.h @@ -154,6 +154,7 @@ typedef unsigned int word_t; do { \ if ((v).data) { \ free((v).data); \ + (v).data = NULL; \ } \ } while (0) |
