mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
prevent double free in cleanup code (#17968)
This commit is contained in:
parent
2adb6fe246
commit
dedac52731
1 changed files with 1 additions and 0 deletions
|
|
@ -10627,6 +10627,7 @@ posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
if (length < 0) {
|
if (length < 0) {
|
||||||
if (errno == ERANGE) {
|
if (errno == ERANGE) {
|
||||||
PyMem_FREE(buffer);
|
PyMem_FREE(buffer);
|
||||||
|
buffer = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
path_error("listxattr", &path);
|
path_error("listxattr", &path);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue