]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: dont null check bitfield pointer before free
authorQuentin Young <qlyoung@cumulusnetworks.com>
Sat, 18 Apr 2020 00:19:33 +0000 (20:19 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Sat, 18 Apr 2020 00:19:38 +0000 (20:19 -0400)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/bitfield.h

index 2d98760df756f451215cc264b9e1f7388ebe4b36..72980165f98e77824caeaccb558f9828c66c8670 100644 (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