From: Michael Tremer Date: Fri, 23 Mar 2012 11:57:30 +0000 (+0100) Subject: Fix some memory leaks in the python C module. X-Git-Tag: 0.9.21~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=830ac5803328adfeb5df4e56d2e93c1972939d9d;p=pakfire.git Fix some memory leaks in the python C module. --- diff --git a/python/src/pool.c b/python/src/pool.c index 76296686d..3c418a247 100644 --- a/python/src/pool.c +++ b/python/src/pool.c @@ -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; } diff --git a/python/src/solvable.c b/python/src/solvable.c index 64407fdad..21ad75813 100644 --- a/python/src/solvable.c +++ b/python/src/solvable.c @@ -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; } diff --git a/python/src/transaction.c b/python/src/transaction.c index d7b30c88c..d81d4bc0a 100644 --- a/python/src/transaction.c +++ b/python/src/transaction.c @@ -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; }