mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
SF patch #708201, unchecked return value in import.c by Jason Harper
Will backport.
This commit is contained in:
parent
29fd2baf82
commit
a11e4c13b1
1 changed files with 2 additions and 0 deletions
|
@ -1924,6 +1924,8 @@ PyImport_ImportModule(char *name)
|
||||||
PyObject *result;
|
PyObject *result;
|
||||||
|
|
||||||
pname = PyString_FromString(name);
|
pname = PyString_FromString(name);
|
||||||
|
if (pname == NULL)
|
||||||
|
return NULL;
|
||||||
result = PyImport_Import(pname);
|
result = PyImport_Import(pname);
|
||||||
Py_DECREF(pname);
|
Py_DECREF(pname);
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue