python: Fix deallocation bug in pytalloc.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 14 Jan 2008 05:03:33 +0000 (06:03 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 14 Jan 2008 18:53:06 +0000 (19:53 +0100)
source/scripting/python/pytalloc.c

index dc61a0a13d70a8bbb48bd2088e78eb915b358ff5..d8d3efe69c15c5b8e1db0376a27c7a817bbc29a8 100644 (file)
@@ -31,7 +31,7 @@ PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx,
                                                   void *ptr)
 {
        py_talloc_Object *ret = PyObject_New(py_talloc_Object, py_type);
-       ret->talloc_ctx = talloc_reference(mem_ctx, ptr); 
+       ret->talloc_ctx = talloc_reference(NULL, mem_ctx); 
        ret->ptr = ptr;
        return (PyObject *)ret;
 }