From: Garming Sam Date: Sun, 17 Jul 2016 21:54:16 +0000 (+1200) Subject: pytalloc: Add a warning about enable_null_tracking X-Git-Tag: tdb-1.3.10~340 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c460ecf8af67e338857452356110e150f360ff8;p=thirdparty%2Fsamba.git 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 --- 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?)