summaryrefslogtreecommitdiff
path: root/Modules/zipimport.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-01-09 09:36:10 -0600
committerBenjamin Peterson <benjamin@python.org>2014-01-09 09:36:10 -0600
commit9e8a51d3c42d54839f7dae25f668a93dd6ee103c (patch)
tree375524d154f0dc7fa0d82083f31bee18a1a24d43 /Modules/zipimport.c
parent8d2dd3c788c989aa9dcdf2166148be3668f7e485 (diff)
downloadcpython-9e8a51d3c42d54839f7dae25f668a93dd6ee103c.tar.gz
fix zipimport ref leak
Diffstat (limited to 'Modules/zipimport.c')
-rw-r--r--Modules/zipimport.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index bfac46233d..fc6c0e4dc2 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -958,10 +958,8 @@ safely_reopen_archive(ZipImporter *self)
}
Py_XDECREF(self->files); /* free the old value. */
self->files = files;
- } else {
- /* No problem, discard the new stat data. */
- Py_DECREF(stat_now);
}
+ Py_DECREF(stat_now);
} /* stat succeeded */
return fp;