SF patch #708201, unchecked return value in import.c by Jason Harper

Will backport.
This commit is contained in:
Neal Norwitz 2003-03-23 14:31:01 +00:00
parent 29fd2baf82
commit a11e4c13b1
1 changed files with 2 additions and 0 deletions

View File

@ -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;