From 3f81649b8dcadb3bd424f41d803dbd59f770b9ba Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 21 Mar 2009 20:02:50 +0100 Subject: Document TALLOC_FREE() --- lib/talloc/talloc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) /** -- cgit