sfree: don't check for NULL before calling free
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 12:08:07 +0000 (14:08 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 12:09:01 +0000 (14:09 +0200)
free(NULL) is safe to call

src/daemon/common.h

index 7b4eb3a..6981d21 100644 (file)
@@ -37,9 +37,7 @@
 
 #define sfree(ptr) \
        do { \
-               if((ptr) != NULL) { \
-                       free(ptr); \
-               } \
+               free(ptr); \
                (ptr) = NULL; \
        } while (0)