[Python-checkins] cpython (3.3): Issue #17968: Fix memory leak in os.listxattr().
antoine.pitrou
python-checkins at python.org
Mon May 13 19:48:58 CEST 2013
http://hg.python.org/cpython/rev/2187cf880e5b
changeset: 83759:2187cf880e5b
branch: 3.3
parent: 83756:27e470952085
user: Antoine Pitrou <solipsis at pitrou.net>
date: Mon May 13 19:46:29 2013 +0200
summary:
Issue #17968: Fix memory leak in os.listxattr().
files:
Misc/NEWS | 4 +++-
Modules/posixmodule.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -49,8 +49,10 @@
Library
-------
+- Issue #17968: Fix memory leak in os.listxattr().
+
- Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
- .characters() and ignorableWhitespace() methods. Original patch by Sebastian
+ characters() and ignorableWhitespace() methods. Original patch by Sebastian
Ortiz Vasquez.
- Issue #17732: Ignore distutils.cfg options pertaining to install paths if a
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -10625,8 +10625,10 @@
Py_END_ALLOW_THREADS;
if (length < 0) {
- if (errno == ERANGE)
+ if (errno == ERANGE) {
+ PyMem_FREE(buffer);
continue;
+ }
path_error("listxattr", &path);
break;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list