Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71382cb

Browse files
committed
Fix reference loss on Py_None when None is encountered in sys.modules.
1 parent a938c74 commit 71382cb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/import.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,6 +2827,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals,
28272827
if (msg != NULL) {
28282828
PyErr_SetFromImportErrorWithName(msg, abs_name);
28292829
}
2830+
mod = NULL;
28302831
goto error_with_unlock;
28312832
}
28322833
else if (mod != NULL) {

0 commit comments

Comments
 (0)