summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index feed81c..936cbda 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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",