From: Stefan Behnel Date: Wed, 10 Sep 2008 16:10:16 +0000 (+0200) Subject: missing decref in __Pyx_ImportType() X-Git-Tag: 0.9.9.2.beta~95^2~9^2 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=00dd94dba183a1dd9f97ad1c7d515b094f59ced7;p=cython.git missing decref in __Pyx_ImportType() --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index b772c2c5..6df6b32a 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2010,6 +2010,9 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class goto bad; result = PyObject_GetAttr(py_module, py_name); Py_DECREF(py_name); + py_name = 0; + Py_DECREF(py_module); + py_module = 0; if (!result) goto bad; if (!PyType_Check(result)) { @@ -2026,6 +2029,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } return (PyTypeObject *)result; bad: + Py_XDECREF(py_module); Py_XDECREF(result); return 0; }