summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 463fb2d)
raw | patch | inline | side by side (parent: 463fb2d)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 12:08:07 +0000 (14:08 +0200) | ||
committer | Ruben 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 | patch | blob | history |
diff --git a/src/daemon/common.h b/src/daemon/common.h
index 7b4eb3abfd53bf10a7b4fced80f1c017802f07ed..6981d21d7aad6371fafda10f2ae7a68616ccaa7d 100644 (file)
--- a/src/daemon/common.h
+++ b/src/daemon/common.h
#define sfree(ptr) \
do { \
- if((ptr) != NULL) { \
- free(ptr); \
- } \
+ free(ptr); \
(ptr) = NULL; \
} while (0)