summaryrefslogtreecommitdiffstats
path: root/source/include/smb_macros.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-26 08:32:30 +0000
committerJeremy Allison <jra@samba.org>2001-12-26 08:32:30 +0000
commit26e4c4099c61c7ba9f2153e56061bea9882553d9 (patch)
treeb68969a82c21508f28f511fc7263e5242351e47c /source/include/smb_macros.h
parent5e3491784277dd90180ef199d2fa258614958545 (diff)
downloadsamba-26e4c4099c61c7ba9f2153e56061bea9882553d9.tar.gz
samba-26e4c4099c61c7ba9f2153e56061bea9882553d9.tar.xz
samba-26e4c4099c61c7ba9f2153e56061bea9882553d9.zip
Get religion on using SAFE_FREE.
Jeremy.
Diffstat (limited to 'source/include/smb_macros.h')
-rw-r--r--source/include/smb_macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h
index 64135c3cb92..bcbe69146aa 100644
--- a/source/include/smb_macros.h
+++ b/source/include/smb_macros.h
@@ -37,7 +37,9 @@
#define IS_DOS_HIDDEN(test_mode) (((test_mode) & aHIDDEN) != 0)
/* free memory if the pointer is valid and zero the pointer */
+#ifndef SAFE_FREE
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
+#endif
/* zero a structure */
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))