Fix missing DECREF of mod. (#4749)

This commit is contained in:
Neil Schemenauer 2017-12-07 16:24:59 -08:00 committed by GitHub
parent dd431b32f4
commit 11cc289490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1735,6 +1735,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
}
}
else {
Py_XDECREF(mod);
mod = import_find_and_load(abs_name);
if (mod == NULL) {
goto error;