diff options
author | Mark Stapp <mjs@voltanet.io> | 2020-04-17 22:53:37 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-04-17 22:53:37 +0200 |
commit | 193848fff6bc4ce978f531178f54d2b65ff8960f (patch) | |
tree | 7a6e51ca0c477323d245c8986c1db416c2ee8922 /lib/bitfield.h | |
parent | Merge pull request #6248 from donaldsharp/zebra_snmp (diff) | |
download | frr-193848fff6bc4ce978f531178f54d2b65ff8960f.tar.xz frr-193848fff6bc4ce978f531178f54d2b65ff8960f.zip |
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 '')
-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 eebfc049d..2d98760df 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) |