Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a11e4c1

Browse files
committed
SF patch #708201, unchecked return value in import.c by Jason Harper
Will backport.
1 parent 29fd2ba commit a11e4c1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Python/import.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,8 @@ PyImport_ImportModule(char *name)
19241924
PyObject *result;
19251925

19261926
pname = PyString_FromString(name);
1927+
if (pname == NULL)
1928+
return NULL;
19271929
result = PyImport_Import(pname);
19281930
Py_DECREF(pname);
19291931
return result;

0 commit comments

Comments
 (0)