mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
PyImport_ReloadModule(): Nailed a small memory leak. In the
else-clause of the subname test, the parentname object was never DECREF'd.
This commit is contained in:
parent
54ecc3d24f
commit
3879333b9e
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user