From: Benjamin Peterson Date: Thu, 9 Jan 2014 15:36:10 +0000 (-0600) Subject: fix zipimport ref leak X-Git-Tag: v2.7.8~143 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7251fe10ffc168f5cdf31c431d9230ec6f3b51f6;p=python fix zipimport ref leak --- 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;