Skip to content

Commit

Permalink
Merge pull request FRRouting#6257 from qlyoung/bitfield-no-null-check…
Browse files Browse the repository at this point in the history
…-before-free
  • Loading branch information
eqvinox authored Apr 18, 2020
2 parents c8eb691 + 1ac10b1 commit 7eea88e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/bitfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ typedef unsigned int word_t;
*/
#define bf_free(v) \
do { \
if ((v).data) { \
free((v).data); \
(v).data = NULL; \
} \
free((v).data); \
(v).data = NULL; \
} while (0)

#ifdef __cplusplus
Expand Down

0 comments on commit 7eea88e

Please sign in to comment.