Commit 3c2d0ca7 authored by Barry Warsaw's avatar Barry Warsaw

PyImport_ReloadModule(): Nailed a small memory leak. In the

else-clause of the subname test, the parentname object was never
DECREF'd.
parent 2ef8d8a6
......@@ -1800,6 +1800,7 @@ PyImport_ReloadModule(m)
if (parentname == NULL)
return NULL;
parent = PyDict_GetItem(modules, parentname);
Py_DECREF(parentname);
if (parent == NULL) {
PyErr_Format(PyExc_ImportError,
"reload(): parent %.200s not in sys.modules",
......
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