diff options
author | Jeremy Allison <jra@samba.org> | 2002-01-02 23:28:55 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-01-02 23:28:55 +0000 |
commit | 4178f211d1d2d133b96b420361944f5e197ec556 (patch) | |
tree | 3ba54c0b0776a724d1a3cb406455919dcdd88c14 /source3/tdb/tdb.h | |
parent | bb70b7811f91290f8c23e745681951a543c15ed4 (diff) | |
download | samba-4178f211d1d2d133b96b420361944f5e197ec556.tar.gz samba-4178f211d1d2d133b96b420361944f5e197ec556.tar.bz2 samba-4178f211d1d2d133b96b420361944f5e197ec556.zip |
debug statement fixups.
Merge SAFE_FREE fix in tdb from 2.2, and IRIX fix.
Jeremy.
(This used to be commit eb6607466565bcd5b3800492d0bc1ae8a44da4f6)
Diffstat (limited to 'source3/tdb/tdb.h')
-rw-r--r-- | source3/tdb/tdb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h index 6877e5cdf4..da8cca19de 100644 --- a/source3/tdb/tdb.h +++ b/source3/tdb/tdb.h @@ -134,6 +134,12 @@ void tdb_dump_all(TDB_CONTEXT *tdb); void tdb_printfreelist(TDB_CONTEXT *tdb); extern TDB_DATA tdb_null; + +/* 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 + #ifdef __cplusplus } #endif |