From dedac52731bd4085a71c0010454c9804b15be80f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 13 May 2013 19:55:40 -0500 Subject: [PATCH] prevent double free in cleanup code (#17968) --- Modules/posixmodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 3e5e58045fd..a351caeddc7 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);