mirror of
https://github.com/python/cpython.git
synced 2025-09-02 06:57:58 +00:00
Fix reference loss on Py_None when None is encountered in sys.modules.
This commit is contained in:
parent
a938c74751
commit
71382cb64b
1 changed files with 1 additions and 0 deletions
|
@ -2827,6 +2827,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals,
|
|||
if (msg != NULL) {
|
||||
PyErr_SetFromImportErrorWithName(msg, abs_name);
|
||||
}
|
||||
mod = NULL;
|
||||
goto error_with_unlock;
|
||||
}
|
||||
else if (mod != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue