diff options
Diffstat (limited to 'source4/lib/talloc/talloc.c')
-rw-r--r-- | source4/lib/talloc/talloc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c index 7ba3e5f3ab..cc04a2425a 100644 --- a/source4/lib/talloc/talloc.c +++ b/source4/lib/talloc/talloc.c @@ -79,10 +79,9 @@ talloc_enable_leak_report_full() is called, otherwise it remains NULL */ -static const void *null_context; +static void *null_context; static void *cleanup_context; - struct talloc_reference_handle { struct talloc_reference_handle *next, *prev; void *ptr; @@ -909,6 +908,15 @@ void talloc_enable_null_tracking(void) } /* + disable tracking of the NULL context +*/ +void talloc_disable_null_tracking(void) +{ + talloc_free(null_context); + null_context = NULL; +} + +/* enable leak reporting on exit */ void talloc_enable_leak_report(void) |