summaryrefslogtreecommitdiff
path: root/lib/talloc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-21 20:02:50 +0100
committerVolker Lendecke <vl@samba.org>2009-03-21 20:04:17 +0100
commit3f81649b8dcadb3bd424f41d803dbd59f770b9ba (patch)
tree87806f7aafd9260a444956a6de62f311c5b6229d /lib/talloc
parent2ce70d4f5a30973b4cc083dbbb38b519007a31bd (diff)
downloadsamba-3f81649b8dcadb3bd424f41d803dbd59f770b9ba.tar.gz
samba-3f81649b8dcadb3bd424f41d803dbd59f770b9ba.tar.bz2
samba-3f81649b8dcadb3bd424f41d803dbd59f770b9ba.zip
Document TALLOC_FREE()
Diffstat (limited to 'lib/talloc')
-rw-r--r--lib/talloc/talloc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index 01e7326ccc..d103d6f4f2 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -633,6 +633,16 @@ typedef void TALLOC_CTX;
#define talloc_append_string(c, s, a) (s?talloc_strdup_append(s,a):talloc_strdup(c, a))
#endif
+/**
+ * \def TALLOC_FREE(ctx)
+ * \brief talloc_free a chunk and NULL out the pointer
+ * \param ctx The chunk to be freed
+ * \ingroup talloc_basic
+ *
+ * TALLOC_FREE() frees a pointer and sets it to NULL. Use this if you want
+ * immediate feedback (i.e. crash) if you use a pointer after having free'ed
+ * it.
+ */
#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
/**