lib: dont null check bitfield pointer before free

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2020-04-17 20:19:33 -04:00
parent 1be1ca35c7
commit 1ac10b15b1

View File

@ -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