summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-12-09 15:11:39 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-12-09 15:11:39 +0200
commit17eb18d0b1b259dbeb269148e6571ae49df9259f (patch)
tree7e7587ceda009b5dbccbb0fddabf5bd5c5022784 /python
parent60b66dc7d9c728d6b779d3d772ac36b9134a2f56 (diff)
downloadrpm-17eb18d0b1b259dbeb269148e6571ae49df9259f.tar.gz
rpm-17eb18d0b1b259dbeb269148e6571ae49df9259f.tar.bz2
rpm-17eb18d0b1b259dbeb269148e6571ae49df9259f.zip
Fix memleak in python ts.hdrFromFdno()
- the python object holds reference to header here, decref the header so it gets freed eventually
Diffstat (limited to 'python')
-rw-r--r--python/rpmts-py.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index c948d22c8..745b52662 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -351,6 +351,7 @@ rpmts_HdrFromFdno(rpmtsObject * s, PyObject *arg)
if (rpmrc == RPMRC_OK) {
ho = hdr_Wrap(&hdr_Type, h);
+ h = headerFree(h); /* ref held by python object */
} else {
Py_INCREF(Py_None);
ho = Py_None;