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

Skip to content

Commit 7d28b6b

Browse files
committed
return NULL here
1 parent fa6bc29 commit 7d28b6b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Python/dynload_shlib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
9191
int i;
9292
struct stat statb;
9393
if (fstat(fileno(fp), &statb) == -1) {
94-
return PyErr_SetFromErrno(PyExc_IOError);
94+
PyErr_SetFromErrno(PyExc_IOError);
95+
return NULL;
9596
}
9697
for (i = 0; i < nhandles; i++) {
9798
if (statb.st_dev == handles[i].dev &&

0 commit comments

Comments
 (0)