summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 2038cfd..010e821 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1924,6 +1924,8 @@ PyImport_ImportModule(char *name)
PyObject *result;
pname = PyString_FromString(name);
+ if (pname == NULL)
+ return NULL;
result = PyImport_Import(pname);
Py_DECREF(pname);
return result;