From 7251fe10ffc168f5cdf31c431d9230ec6f3b51f6 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 9 Jan 2014 09:36:10 -0600 Subject: [PATCH] fix zipimport ref leak --- Modules/zipimport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Modules/zipimport.c b/Modules/zipimport.c index ff8dedf779..24439e0197 100644 --- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -832,10 +832,8 @@ safely_reopen_archive(ZipImporter *self, char **archive_p) } 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; -- 2.50.1