commit | 3879333b9eef62541a68d8c7fd3e95e544a1ebda | [log] [tgz] |
---|---|---|
author | Barry Warsaw <barry@python.org> | Wed Jan 27 17:54:20 1999 +0000 |
committer | Barry Warsaw <barry@python.org> | Wed Jan 27 17:54:20 1999 +0000 |
tree | 5d7c1749e6a670d075ae211f73988e9eda86bf7d | |
parent | 54ecc3d24f52ae45ca54a24167e434915c88b60f [diff] [blame] |
PyImport_ReloadModule(): Nailed a small memory leak. In the else-clause of the subname test, the parentname object was never DECREF'd.
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 @@ 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",