summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-23 23:15:05 +0100
committerVolker Lendecke <vl@samba.org>2009-01-24 01:05:22 +0100
commit48a6feef402f7b91098341dc6e5eabbfd4beaa91 (patch)
treeb6fb2e20b8aac38435b0727377c0603e34b02228
parentb7eabeb347d6815a7a4a0ece282dba5da94777ca (diff)
downloadsamba-48a6feef402f7b91098341dc6e5eabbfd4beaa91.tar.gz
samba-48a6feef402f7b91098341dc6e5eabbfd4beaa91.tar.bz2
samba-48a6feef402f7b91098341dc6e5eabbfd4beaa91.zip
talloc_free() copes with a NULL pointer just fine
Saved around 10kb of code on my box :-)
-rw-r--r--source3/include/smb_macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 5149da0cb3..92c60a7530 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -256,7 +256,7 @@ 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)
-#define TALLOC_FREE(ctx) do { if ((ctx) != NULL) {talloc_free(ctx); ctx=NULL;} } while(0)
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
/* only define PARANOID_MALLOC_CHECKER with --enable-developer */