mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s4-python: Properly call PyObject_Del from all destructors.
This commit is contained in:
parent
b320cc7990
commit
cbf504b0c5
@ -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;
|
||||
self->ob_type->tp_free(self);
|
||||
PyObject_Del(self);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1502,7 +1502,7 @@ static PyObject *PyLdb_FromLdbContext(struct ldb_context *ldb_ctx)
|
||||
static void py_ldb_dealloc(PyLdbObject *self)
|
||||
{
|
||||
talloc_free(self->mem_ctx);
|
||||
self->ob_type->tp_free(self);
|
||||
PyObject_Del(self);
|
||||
}
|
||||
|
||||
PyTypeObject PyLdb = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user