mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
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>
This commit is contained in:
parent
f7c53e0add
commit
ced158d250
@ -575,6 +575,8 @@ static void py_ldb_debug(void *context, enum ldb_debug_level level, const char *
|
|||||||
if (ldif == NULL) {
|
if (ldif == NULL) {
|
||||||
return Py_None;
|
return Py_None;
|
||||||
} else {
|
} else {
|
||||||
|
/* We don't want this attached to the 'ldb' any more */
|
||||||
|
talloc_steal(NULL, ldif);
|
||||||
return Py_BuildValue((char *)"(iO)", ldif->changetype,
|
return Py_BuildValue((char *)"(iO)", ldif->changetype,
|
||||||
SWIG_NewPointerObj(ldif->msg, SWIGTYPE_p_ldb_message, 0));
|
SWIG_NewPointerObj(ldif->msg, SWIGTYPE_p_ldb_message, 0));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user