summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/import.c b/Python/import.c
index 673d1b3324..c60ecfea5e 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -2845,10 +2845,8 @@ call_find_module(char *name, PyObject *path)
return NULL;
if (fp != NULL) {
fob = PyFile_FromFile(fp, pathname, fdp->mode, fclose);
- if (fob == NULL) {
- fclose(fp);
+ if (fob == NULL)
return NULL;
- }
}
else {
fob = Py_None;