From 0f28fa25ee760daca1b75bcfc5dd500e2b4d42a1 Mon Sep 17 00:00:00 2001 From: Mike Owen Date: Wed, 18 Nov 2009 22:31:57 +0000 Subject: [PATCH] Add a missing Py_DECREF in the sq_item slot wrapper. --- pybindgen/pytypeobject.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pybindgen/pytypeobject.py b/pybindgen/pytypeobject.py index efe61b7..c864ec7 100644 --- a/pybindgen/pytypeobject.py +++ b/pybindgen/pytypeobject.py @@ -278,6 +278,7 @@ static PyObject* args = Py_BuildValue("(i)", py_i); result = %(method_name)s(py_self, args, NULL); + Py_DECREF(args); if (PyErr_ExceptionMatches(PyExc_IndexError) || PyErr_ExceptionMatches(PyExc_StopIteration)) { Py_XDECREF(result);