mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #17968: Fix memory leak in os.listxattr().
This commit is contained in:
parent
901a278861
commit
7f987398b7
2 changed files with 6 additions and 2 deletions
|
@ -10625,8 +10625,10 @@ posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
Py_END_ALLOW_THREADS;
|
||||
|
||||
if (length < 0) {
|
||||
if (errno == ERANGE)
|
||||
if (errno == ERANGE) {
|
||||
PyMem_FREE(buffer);
|
||||
continue;
|
||||
}
|
||||
path_error("listxattr", &path);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue