Commits

Anonymous committed 963a0fb

In find_module(), do not silence fileno() and dup() errors.

Comments (0)

Files changed (1)

             fd = dup(fd);
         fclose(fp);
         fp = NULL;
+        if (fd == -1)
+            return PyErr_SetFromErrno(PyExc_OSError);
     }
     if (fd != -1) {
         if (strchr(fdp->mode, 'b') == NULL) {