summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-29 15:58:12 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-01-01 02:54:05 +0100
commit4350e0c3c99fedab99ab1cc680e9d8fe555162e9 (patch)
treeac3a67038c9b74e395f5f2ede8822200b7313baa /source4/lib/ldb
parent9529fdab26270f4d35119e87f9ca8a7693c24a3f (diff)
downloadsamba-4350e0c3c99fedab99ab1cc680e9d8fe555162e9.tar.gz
samba-4350e0c3c99fedab99ab1cc680e9d8fe555162e9.tar.bz2
samba-4350e0c3c99fedab99ab1cc680e9d8fe555162e9.zip
s4-python: Properly call PyObject_Del from all destructors.
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/pyldb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index d67d53f982..5446aafb92 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -358,7 +358,7 @@ static PyObject *py_ldb_dn_new(PyTypeObject *type, PyObject *args, PyObject *kwa
static void py_ldb_dn_dealloc(PyLdbDnObject *self)
{
talloc_free(self->mem_ctx);
- self->ob_type->tp_free(self);
+ PyObject_Del(self);
}
PyTypeObject PyLdbDn = {
@@ -1500,7 +1500,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 = {
@@ -1694,7 +1694,7 @@ static PyMethodDef py_ldb_module_methods[] = {
static void py_ldb_module_dealloc(PyLdbModuleObject *self)
{
talloc_free(self->mem_ctx);
- self->ob_type->tp_free(self);
+ PyObject_Del(self);
}
PyTypeObject PyLdbModule = {
@@ -1985,7 +1985,7 @@ static PyObject *py_ldb_msg_element_str(PyLdbMessageElementObject *self)
static void py_ldb_msg_element_dealloc(PyLdbMessageElementObject *self)
{
talloc_free(self->mem_ctx);
- self->ob_type->tp_free(self);
+ PyObject_Del(self);
}
static PyTypeObject PyLdbMessageElement = {
@@ -2322,7 +2322,7 @@ static PyObject *py_ldb_msg_repr(PyLdbMessageObject *self)
static void py_ldb_msg_dealloc(PyLdbMessageObject *self)
{
talloc_free(self->mem_ctx);
- self->ob_type->tp_free(self);
+ PyObject_Del(self);
}
static int py_ldb_msg_compare(PyLdbMessageObject *py_msg1,
@@ -2394,7 +2394,7 @@ PyObject *PyLdbTree_FromTree(struct ldb_parse_tree *tree)
static void py_ldb_tree_dealloc(PyLdbTreeObject *self)
{
talloc_free(self->mem_ctx);
- self->ob_type->tp_free(self);
+ PyObject_Del(self);
}
PyTypeObject PyLdbTree = {