summaryrefslogtreecommitdiff
path: root/python/rpmmi-py.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-24 12:52:32 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-24 12:52:32 +0300
commit74c1040dbc4b4977045745f924ea0774c2e3ee53 (patch)
tree7690fe76effa1db2c4a3de394a37272e14436d88 /python/rpmmi-py.c
parent36ada6c116e123f5b5b739e12f256201e5cc6fa1 (diff)
downloadlibrpm-tizen-74c1040dbc4b4977045745f924ea0774c2e3ee53.tar.gz
librpm-tizen-74c1040dbc4b4977045745f924ea0774c2e3ee53.tar.bz2
librpm-tizen-74c1040dbc4b4977045745f924ea0774c2e3ee53.zip
Call (sub)type tp_free from destructors
- more preliminaries for subtyping - remove pointless NULL checks
Diffstat (limited to 'python/rpmmi-py.c')
-rw-r--r--python/rpmmi-py.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/python/rpmmi-py.c b/python/rpmmi-py.c
index 0fa1ab395..d6ab095a1 100644
--- a/python/rpmmi-py.c
+++ b/python/rpmmi-py.c
@@ -131,11 +131,9 @@ static struct PyMethodDef rpmmi_methods[] = {
static void rpmmi_dealloc(rpmmiObject * s)
{
- if (s) {
- s->mi = rpmdbFreeIterator(s->mi);
- Py_DECREF(s->ref);
- PyObject_Del(s);
- }
+ s->mi = rpmdbFreeIterator(s->mi);
+ Py_DECREF(s->ref);
+ s->ob_type->tp_free((PyObject *)s);
}
static char rpmmi_doc[] =