summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-16 10:13:58 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-16 11:14:53 +0100
commita3998832dbdbeb9ba5f3576a242bd48a5a3b3b60 (patch)
tree7d00dc4740f17886e843668891e4e4da1f4fbfaa
parenta73bd05eec608d29888286542e9c882039b02857 (diff)
downloadsamba-a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60.tar.gz
samba-a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60.tar.bz2
samba-a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60.zip
talloc: add TALLOC_ZERO()
metze
-rw-r--r--lib/talloc/talloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index b62393494b..0defd4ab0e 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -115,6 +115,8 @@ typedef void TALLOC_CTX;
#define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a))
#endif
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+
/* The following definitions come from talloc.c */
void *_talloc(const void *context, size_t size);
void *talloc_pool(const void *context, size_t size);