projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
463fb2d
)
sfree: don't check for NULL before calling free
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
7b4eb3a
..
6981d21
100644
(file)
--- a/
src/daemon/common.h
+++ b/
src/daemon/common.h
@@
-37,9
+37,7
@@
#define sfree(ptr) \
do { \
- if((ptr) != NULL) { \
- free(ptr); \
- } \
+ free(ptr); \
(ptr) = NULL; \
} while (0)