Commit 71382cb6 authored by Antoine Pitrou's avatar Antoine Pitrou

Fix reference loss on Py_None when None is encountered in sys.modules.

parent a938c747
...@@ -2827,6 +2827,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals, ...@@ -2827,6 +2827,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals,
if (msg != NULL) { if (msg != NULL) {
PyErr_SetFromImportErrorWithName(msg, abs_name); PyErr_SetFromImportErrorWithName(msg, abs_name);
} }
mod = NULL;
goto error_with_unlock; goto error_with_unlock;
} }
else if (mod != NULL) { else if (mod != NULL) {
......
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