mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
SF patch #708201, unchecked return value in import.c by Jason Harper
Will backport.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user