summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-04-16 16:48:49 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-04-16 16:48:49 (GMT)
commit71382cb64bd9cbf76d8a1e0fe8297a973cd1fe4d (patch)
treef3cc3e65f81194057d3511bed6d840547a740ae9 /Python/import.c
parenta938c74751d3ffb23cb68044939a5c06d2d4f280 (diff)
downloadcpython-71382cb64bd9cbf76d8a1e0fe8297a973cd1fe4d.zip
cpython-71382cb64bd9cbf76d8a1e0fe8297a973cd1fe4d.tar.gz
cpython-71382cb64bd9cbf76d8a1e0fe8297a973cd1fe4d.tar.bz2
Fix reference loss on Py_None when None is encountered in sys.modules.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 1b93b7c..bd0d18a 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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) {