From 7d28b6b379ec2e772cbaa55c7ed6705459c2d5b4 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 22 Jul 2013 22:08:09 -0700 Subject: [PATCH] return NULL here --- Python/dynload_shlib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index e220b215223..75544ed3bc3 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 &&