From: Benjamin Peterson Date: Tue, 14 May 2013 00:55:40 +0000 (-0500) Subject: prevent double free in cleanup code (#17968) X-Git-Tag: v3.4.0a1~730^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dedac52731bd4085a71c0010454c9804b15be80f;p=thirdparty%2FPython%2Fcpython.git prevent double free in cleanup code (#17968) --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 3e5e58045fdc..a351caeddc77 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);