From 872e1a19e42b749e5266e9c02b5ac6b98db6dd40 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Mon, 18 Jul 2016 09:54:16 +1200 Subject: [PATCH 1/2] pytalloc: Add a warning about enable_null_tracking NOTE: The removal of enable_null_tracking is required because we are no longer importing join.py in every single samba-tool invocation. Without removing this line, 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 --- lib/talloc/pytalloc_guide.txt | 2 ++ python/samba/join.py | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/talloc/pytalloc_guide.txt b/lib/talloc/pytalloc_guide.txt index 1aa4f99..38052dc 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 script. + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- pytalloc_total_blocks(obj?) diff --git a/python/samba/join.py b/python/samba/join.py index 3532a7f..10cc5a3 100644 --- a/python/samba/join.py +++ b/python/samba/join.py @@ -39,9 +39,6 @@ import talloc import random import time -# this makes debugging easier -talloc.enable_null_tracking() - class DCJoinException(Exception): def __init__(self, msg): -- 1.9.1