talloc: added talloc_stackframe_exists()
commitb07e4933b7ed4b2452cfdd9d223eecb8c0b74fec
authorAndrew Tridgell <tridge@samba.org>
Fri, 17 Jun 2011 04:22:28 +0000 (17 14:22 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 17 Jun 2011 05:25:42 +0000 (17 15:25 +1000)
tree403da4bce41947f9030745b1460e1eacef74e615
parente080ae0faa2556825189f82fa61a7ff5f249dbc5
talloc: added talloc_stackframe_exists()

This can be used to tell if a talloc stackframe is currently
available. Callers can use this to decide if they will use
talloc_tos() or instead use an alternative strategy. This gives us a
way to safely have calls to talloc_tos() in common code that may end
up in external libraries, as long as all talloc_tos() calls in these
pieces of common code check first that a stackframe is available.
lib/util/talloc_stack.c
lib/util/talloc_stack.h