diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2013-05-13 19:46:29 +0200 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-05-13 19:46:29 +0200 |
| commit | 7f987398b7fa8984ab8aa88acff2b7e1d89e3da7 (patch) | |
| tree | 02da96b647ba4eecb8bf15816e26f9d9353a3b31 /Modules | |
| parent | 901a278861d070e55b426f8fb67bb83707da96d2 (diff) | |
| download | cpython-git-7f987398b7fa8984ab8aa88acff2b7e1d89e3da7.tar.gz | |
Issue #17968: Fix memory leak in os.listxattr().
Diffstat (limited to 'Modules')
| -rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 551af2f5a8..3e5e58045f 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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; } |
