s3: only define TALLOC_ZERO if needed
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Mar 2009 09:13:34 +0000 (10:13 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 16 Mar 2009 10:14:53 +0000 (11:14 +0100)
metze

source3/include/smb_macros.h
source3/libaddns/dns.h

index fd1bba16a7a319111699d981f5bffd7c5424be5d..22cfaaf58129a8d26223682b5ffb4ff699852ba2 100644 (file)
@@ -256,7 +256,9 @@ NULL returns on zero request. JRA.
 #define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, __location__)
 #define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
 #define talloc_destroy(ctx) talloc_free(ctx)
+#ifndef TALLOC_FREE
 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
 
 /* only define PARANOID_MALLOC_CHECKER with --enable-developer */
 
index 57a9b6a0020d6c74ef4690c64b1ccb26a2300d2a..a04a13bfd96a7027257970b2368555f8a1575ce4 100644 (file)
@@ -133,7 +133,9 @@ void *talloc_zeronull(const void *context, size_t size, const char *name);
 #define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, __location__)
 #define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
 #define talloc_destroy(ctx) talloc_free(ctx)
+#ifndef TALLOC_FREE
 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
 
 /*******************************************************************
    Type definitions for int16, int32, uint16 and uint32.  Needed