diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-12-16 08:34:48 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-12-17 12:29:25 +1100 |
commit | ced158d25066a236fba36c0e8391de1eab301a17 (patch) | |
tree | 05e79ec7cc68111ea7997fb184860de0d4239703 /source4/lib | |
parent | f7c53e0addb13dd085ed102b8afaec2122e078ea (diff) | |
download | samba-ced158d25066a236fba36c0e8391de1eab301a17.tar.gz samba-ced158d25066a236fba36c0e8391de1eab301a17.tar.bz2 samba-ced158d25066a236fba36c0e8391de1eab301a17.zip |
s4:ldb.i: hang the dn on the NULL context as the python destructor will free it
This fixes a bug in the ldb.i python wrapper, that showed up under valgrind.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/ldb.i | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb.i b/source4/lib/ldb/ldb.i index 0f05c1fbab..7831d6da60 100644 --- a/source4/lib/ldb/ldb.i +++ b/source4/lib/ldb/ldb.i @@ -575,6 +575,8 @@ static void py_ldb_debug(void *context, enum ldb_debug_level level, const char * if (ldif == NULL) { return Py_None; } else { + /* We don't want this attached to the 'ldb' any more */ + talloc_steal(NULL, ldif); return Py_BuildValue((char *)"(iO)", ldif->changetype, SWIG_NewPointerObj(ldif->msg, SWIGTYPE_p_ldb_message, 0)); } |