summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-05-14 00:55:40 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-05-14 00:55:40 (GMT)
commitdedac52731bd4085a71c0010454c9804b15be80f (patch)
tree79bc207ed84cba5794bdc4c44048b1ca3347c639 /Modules
parent2adb6fe246c0e07b30a70cd5c08e4aebc5b2923d (diff)
downloadcpython-dedac52731bd4085a71c0010454c9804b15be80f.zip
cpython-dedac52731bd4085a71c0010454c9804b15be80f.tar.gz
cpython-dedac52731bd4085a71c0010454c9804b15be80f.tar.bz2
prevent double free in cleanup code (#17968)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 3e5e580..a351cae 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -10627,6 +10627,7 @@ posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
if (length < 0) {
if (errno == ERANGE) {
PyMem_FREE(buffer);
+ buffer = NULL;
continue;
}
path_error("listxattr", &path);