From 830ac5803328adfeb5df4e56d2e93c1972939d9d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 23 Mar 2012 12:57:30 +0100 Subject: [PATCH] Fix some memory leaks in the python C module. --- python/src/pool.c | 2 -- python/src/solvable.c | 1 - python/src/transaction.c | 1 - 3 files changed, 4 deletions(-) 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; } -- 2.39.5