]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
prevent double free in cleanup code (#17968)
authorBenjamin Peterson <benjamin@python.org>
Tue, 14 May 2013 00:55:40 +0000 (19:55 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 14 May 2013 00:55:40 +0000 (19:55 -0500)
Modules/posixmodule.c

index 3e5e58045fdcd0fd5f22c27742d4cfc945389281..a351caeddc7771ddee58689c388a2b8e4b4bbf09 100644 (file)
@@ -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);