]> granicus.if.org Git - python/commitdiff
return NULL here
authorBenjamin Peterson <benjamin@python.org>
Tue, 23 Jul 2013 05:08:09 +0000 (22:08 -0700)
committerBenjamin Peterson <benjamin@python.org>
Tue, 23 Jul 2013 05:08:09 +0000 (22:08 -0700)
Python/dynload_shlib.c

index e220b2152239e80fd93b9439abeeabb00f35c9ba..75544ed3bc38222e8fafa340ae35e7a2b4f90b86 100644 (file)
@@ -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 &&