git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d06983
)
talloc: avoid a function call in TALLOC_FREE() if possible.
author
Stefan Metzmacher
<metze@samba.org>
Wed, 4 Dec 2013 14:35:37 +0000
(15:35 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 12 Mar 2014 23:04:36 +0000
(
00:04
+0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/talloc/talloc.h
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.h
b/lib/talloc/talloc.h
index 5d29a8d5cf050f9ec5d4f16e81885e6437e6b9ee..0d47d23b2ff570db1ff0d5e6ef1cf389c4e8fc64 100644
(file)
--- a/
lib/talloc/talloc.h
+++ b/
lib/talloc/talloc.h
@@
-893,7
+893,7
@@
void *_talloc_pooled_object(const void *ctx,
*
* @param[in] ctx The chunk to be freed.
*/
-#define TALLOC_FREE(ctx) do {
talloc_free(ctx); ctx=NULL;
} while(0)
+#define TALLOC_FREE(ctx) do {
if (ctx != NULL) { talloc_free(ctx); ctx=NULL; }
} while(0)
/* @} ******************************************************************/