[Python-checkins] cpython (3.3): prevent double free in cleanup code (#17968)

benjamin.peterson python-checkins at python.org
Tue May 14 02:56:48 CEST 2013


http://hg.python.org/cpython/rev/7aa157971810
changeset:   83767:7aa157971810
branch:      3.3
parent:      83765:6481f819e6f0
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon May 13 19:55:40 2013 -0500
summary:
  prevent double free in cleanup code (#17968)

files:
  Modules/posixmodule.c |  1 +
  1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -10627,6 +10627,7 @@
         if (length < 0) {
             if (errno == ERANGE) {
                 PyMem_FREE(buffer);
+                buffer = NULL;
                 continue;
             }
             path_error("listxattr", &path);

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


More information about the Python-checkins mailing list