git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2ce70d4
)
Document TALLOC_FREE()
author
Volker Lendecke
<vl@samba.org>
Sat, 21 Mar 2009 19:02:50 +0000
(20:02 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sat, 21 Mar 2009 19:04:17 +0000
(20:04 +0100)
lib/talloc/talloc.h
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.h
b/lib/talloc/talloc.h
index 01e7326ccc602edd6f754a04134d5f67d629ba33..d103d6f4f200d4a3c307fca84c37b1dc85a48b91 100644
(file)
--- 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
#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)
/**
#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
/**