diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-05-13 19:55:40 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-05-13 19:55:40 -0500 |
commit | dedac52731bd4085a71c0010454c9804b15be80f (patch) | |
tree | 79bc207ed84cba5794bdc4c44048b1ca3347c639 | |
parent | 2adb6fe246c0e07b30a70cd5c08e4aebc5b2923d (diff) | |
download | cpython-git-dedac52731bd4085a71c0010454c9804b15be80f.tar.gz |
prevent double free in cleanup code (#17968)
-rw-r--r-- | Modules/posixmodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 3e5e58045f..a351caeddc 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); |