summaryrefslogtreecommitdiffstats
path: root/Python/dynload_shlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/dynload_shlib.c')
-rw-r--r--Python/dynload_shlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index e220b21..75544ed 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -91,7 +91,8 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
int i;
struct stat statb;
if (fstat(fileno(fp), &statb) == -1) {
- return PyErr_SetFromErrno(PyExc_IOError);
+ PyErr_SetFromErrno(PyExc_IOError);
+ return NULL;
}
for (i = 0; i < nhandles; i++) {
if (statb.st_dev == handles[i].dev &&