Kaydet (Commit) d417d01e authored tarafından Victor Stinner's avatar Victor Stinner

call_find_module() handles dup() failure: raise an OSError exception

üst 925ef399
......@@ -3567,6 +3567,10 @@ call_find_module(PyObject *name, PyObject *path_list)
if (fd != -1)
fd = dup(fd);
fclose(fp);
if (fd == -1) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
fp = NULL;
}
if (fd != -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment