summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/talloc/pytalloc.c2
-rw-r--r--source4/lib/ldb/pyldb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index 94a163d3d9..614b81f057 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -96,7 +96,7 @@ static void py_talloc_dealloc(PyObject* self)
py_talloc_Object *obj = (py_talloc_Object *)self;
assert(talloc_unlink(NULL, obj->talloc_ctx) != -1);
obj->talloc_ctx = NULL;
- PyObject_Del(self);
+ self->ob_type->tp_free(self);
}
/**
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 7ef416852d..e74cae2d20 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -1512,7 +1512,7 @@ static PyObject *PyLdb_FromLdbContext(struct ldb_context *ldb_ctx)
static void py_ldb_dealloc(PyLdbObject *self)
{
talloc_free(self->mem_ctx);
- PyObject_Del(self);
+ self->ob_type->tp_free(self);
}
static PyTypeObject PyLdb = {