From 6c460ecf8af67e338857452356110e150f360ff8 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Mon, 18 Jul 2016 09:54:16 +1200 Subject: [PATCH] pytalloc: Add a warning about enable_null_tracking If it is called in the middle of a script such as samba-tool, memory would be hanging from both the actual NULL context and the talloc_null_context (causing a segfault at system_exit). Signed-off-by: Garming Sam Reviewed-by: Douglas Bagnall --- lib/talloc/pytalloc_guide.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/talloc/pytalloc_guide.txt b/lib/talloc/pytalloc_guide.txt index 1aa4f994479..962d44933ba 100644 --- a/lib/talloc/pytalloc_guide.txt +++ b/lib/talloc/pytalloc_guide.txt @@ -182,6 +182,8 @@ This enables tracking of the NULL memory context without enabling leak reporting on exit. Useful for when you want to do your own leak reporting call via talloc_report_null_full(). +This must be done in the top level script, not an imported module. + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- pytalloc_total_blocks(obj?) -- 2.11.4.GIT