From: Ruben Kerkhof Date: Sat, 23 Apr 2016 12:08:07 +0000 (+0200) Subject: sfree: don't check for NULL before calling free X-Git-Tag: collectd-5.6.0~328 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c1e610803799c42a121f4b6374a202d6612a1286;p=collectd.git sfree: don't check for NULL before calling free free(NULL) is safe to call --- diff --git a/src/daemon/common.h b/src/daemon/common.h index 7b4eb3ab..6981d21d 100644 --- 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)