summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-06-20 07:37:59 -0700
committerSenthil Kumaran <senthil@uthcode.com>2011-06-20 07:37:59 -0700
commit54e647f21511feca159a734b49878f566c72ab1d (patch)
treef9e1ed17cd79ab25a4c40b0ab41552e9143f9bef /Python/import.c
parent1dbb7591dad2b8a59cc856f1784aba1c8207012b (diff)
parentd417d01ec80d9d13918fc90fd3ce0080232a8e7c (diff)
downloadcpython-git-54e647f21511feca159a734b49878f566c72ab1d.tar.gz
merge heads
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index de5dc0ca41..19e975a593 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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) {