]> git.ipfire.org Git - pakfire.git/commitdiff
Fix some memory leaks in the python C module.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Mar 2012 11:57:30 +0000 (12:57 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Mar 2012 11:57:30 +0000 (12:57 +0100)
python/src/pool.c
python/src/solvable.c
python/src/transaction.c

index 76296686d10ea014cabedb70f8372920f1fbbf26..3c418a247e2c9f2d6bfdcee9ae998e5c085afbcf 100644 (file)
@@ -131,8 +131,6 @@ PyObject *_Pool_search(Pool *pool, Repo *repo, const char *match, int option, co
        }
 
        dataiterator_free(&d);
-
-       Py_INCREF(list);
        return list;
 }
 
index 64407fdad2e17f6de5e7febc9549958a8f4e14c5..21ad758134a1e53c8a478ee2da52e9a01bd2379c 100644 (file)
@@ -170,7 +170,6 @@ PyObject *_Solvable_get_dependencies(Solvable *solv, Offset deps) {
                PyList_Append(list, Py_BuildValue("s", dep_str));
        }
 
-       Py_INCREF(list);
        return list;
 }
 
index d7b30c88c0de7cf917131708e8ca9a9ca0bde302..d81d4bc0a54e980b16963911cd14cd248d291d7d 100644 (file)
@@ -80,7 +80,6 @@ PyObject *Transaction_steps(TransactionObject *self, PyObject *args) {
                PyList_Append(list, (PyObject *)step);
        }
 
-       Py_INCREF(list); // XXX do we need this here?
        return list;
 }