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

This commit is contained in:
Antoine Pitrou 2012-04-16 18:48:49 +02:00
parent a938c74751
commit 71382cb64b
1 changed files with 1 additions and 0 deletions

View File

@ -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) {