summaryrefslogtreecommitdiff
path: root/lib/util/talloc_stack.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-07-18 15:07:27 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-07-18 15:07:27 +0930
commit1f8b574adb10397ca4b9dc4a55281d3afaaeabfc (patch)
treea09b60410d6925e85c2ca6a55409d7feb2001418 /lib/util/talloc_stack.h
parentfe72740e8221575921c22030d6d4fcb19201b03b (diff)
downloadsamba-1f8b574adb10397ca4b9dc4a55281d3afaaeabfc.tar.gz
samba-1f8b574adb10397ca4b9dc4a55281d3afaaeabfc.tar.bz2
samba-1f8b574adb10397ca4b9dc4a55281d3afaaeabfc.zip
talloc_stack: abort in developer me if no stackframe on talloc_tos()
Don't tolerate leaks in developer mode. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/util/talloc_stack.h')
-rw-r--r--lib/util/talloc_stack.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util/talloc_stack.h b/lib/util/talloc_stack.h
index 8e1644624b..2f5dcab0a3 100644
--- a/lib/util/talloc_stack.h
+++ b/lib/util/talloc_stack.h
@@ -53,7 +53,8 @@ TALLOC_CTX *_talloc_stackframe_pool(const char *location, size_t poolsize);
* Get us the current top of the talloc stack.
*/
-TALLOC_CTX *talloc_tos(void);
+#define talloc_tos() _talloc_tos(__location__)
+TALLOC_CTX *_talloc_tos(const char *location);
/*
* return true if a talloc stackframe exists