[Python-checkins] cpython (2.7): fix zipimport ref leak

benjamin.peterson python-checkins at python.org
Thu Jan 9 16:37:09 CET 2014


http://hg.python.org/cpython/rev/30d761849a27
changeset:   88367:30d761849a27
branch:      2.7
parent:      88359:4c4ae679eec3
user:        Benjamin Peterson <benjamin at python.org>
date:        Thu Jan 09 09:36:10 2014 -0600
summary:
  fix zipimport ref leak

files:
  Modules/zipimport.c |  4 +---
  1 files changed, 1 insertions(+), 3 deletions(-)


diff --git a/Modules/zipimport.c b/Modules/zipimport.c
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -832,10 +832,8 @@
             }
             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;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list