s4:ldb.i: hang the dn on the NULL context as the python destructor will free it
[kai/samba.git] / source4 / lib / ldb / ldb.i
index 0f05c1fbab6bfaf66938bb5c0e734ea9d2da96cf..7831d6da606516b31b43888bc201f1fc30dd3792 100644 (file)
@@ -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));
         }