From f9b51ff33e10aa126de848072e98b0bf36a7dbc7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 04:56:31 +0930 Subject: talloc_stack: always include the location when creating a talloc_stackframe(). Much better for debugging. Signed-off-by: Rusty Russell --- lib/util/talloc_stack.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/util/talloc_stack.h') diff --git a/lib/util/talloc_stack.h b/lib/util/talloc_stack.h index ec0c1c6f37..8e1644624b 100644 --- a/lib/util/talloc_stack.h +++ b/lib/util/talloc_stack.h @@ -44,8 +44,10 @@ * not explicitly freed. */ -TALLOC_CTX *talloc_stackframe(void); -TALLOC_CTX *talloc_stackframe_pool(size_t poolsize); +#define talloc_stackframe() _talloc_stackframe(__location__) +#define talloc_stackframe_pool(sz) _talloc_stackframe_pool(__location__, (sz)) +TALLOC_CTX *_talloc_stackframe(const char *location); +TALLOC_CTX *_talloc_stackframe_pool(const char *location, size_t poolsize); /* * Get us the current top of the talloc stack. -- cgit