Commit 2e77c5d3 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix missing decref in __Pyx_ImportModule

parent e4d09f3d
...@@ -1596,11 +1596,14 @@ static PyObject *__Pyx_ImportModule(char *name); /*proto*/ ...@@ -1596,11 +1596,14 @@ static PyObject *__Pyx_ImportModule(char *name); /*proto*/
#define __PYX_HAVE_RT_ImportModule #define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(char *name) { static PyObject *__Pyx_ImportModule(char *name) {
PyObject *py_name = 0; PyObject *py_name = 0;
PyObject *py_module = 0;
py_name = PyString_FromString(name); py_name = PyString_FromString(name);
if (!py_name) if (!py_name)
goto bad; goto bad;
return PyImport_Import(py_name); py_module = PyImport_Import(py_name);
Py_DECREF(py_name);
return py_module;
bad: bad:
Py_XDECREF(py_name); Py_XDECREF(py_name);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment