summaryrefslogtreecommitdiff
path: root/python/rpmte-py.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-06-05 15:18:49 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-06-05 15:18:49 +0300
commit504775bb6997ba05ce441b2c8a67b65c289639b9 (patch)
tree09596e28e1247f50ff825e561b44594001450737 /python/rpmte-py.c
parent7ca13025364fd3320d658e8220346f2eb7e0a55e (diff)
downloadrpm-504775bb6997ba05ce441b2c8a67b65c289639b9.tar.gz
rpm-504775bb6997ba05ce441b2c8a67b65c289639b9.tar.bz2
rpm-504775bb6997ba05ce441b2c8a67b65c289639b9.zip
Python rpm.te Key() refcount fix (rhbz#182063) from JBJ.
Diffstat (limited to 'python/rpmte-py.c')
-rw-r--r--python/rpmte-py.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/rpmte-py.c b/python/rpmte-py.c
index 4f40bbd5a..58df539c2 100644
--- a/python/rpmte-py.c
+++ b/python/rpmte-py.c
@@ -221,10 +221,9 @@ rpmte_Key(rpmteObject * s)
/* XXX how to insure this is a PyObject??? */
Key = (PyObject *) rpmteKey(s->te);
- if (Key == NULL) {
- Py_INCREF(Py_None);
- return Py_None;
- }
+ if (Key == NULL)
+ Key = Py_None;
+ Py_INCREF(Key);
return Key;
}