summaryrefslogtreecommitdiff
path: root/lib/bitfield.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-04-17 20:19:33 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-17 20:19:38 -0400
commit1ac10b15b1ee27246fd124f8ffa3350783dcf800 (patch)
tree74c7ded08c0714f73d0cf43ca30850c43426f98c /lib/bitfield.h
parent1be1ca35c7be8a4b0813542fa8df2db2e1bfddfc (diff)
lib: dont null check bitfield pointer before free
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/bitfield.h')
-rw-r--r--lib/bitfield.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/bitfield.h b/lib/bitfield.h
index 2d98760df7..72980165f9 100644
--- a/lib/bitfield.h
+++ b/lib/bitfield.h
@@ -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