From ba549acc2ee6531c91ae4d4dde9cc4553b2c1d09 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 16 Mar 2009 10:13:34 +0100 Subject: [PATCH] s3: only define TALLOC_FREE if needed metze (cherry picked from commit a73bd05eec608d29888286542e9c882039b02857) --- source3/include/smb_macros.h | 2 ++ source3/libaddns/dns.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index fd1bba16a7a..22cfaaf5812 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -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 */ diff --git a/source3/libaddns/dns.h b/source3/libaddns/dns.h index 57a9b6a0020..a04a13bfd96 100644 --- a/source3/libaddns/dns.h +++ b/source3/libaddns/dns.h @@ -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 -- 2.11.4.GIT