mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Windows: fix leak in posix_listdir.
This commit is contained in:
parent
e71362d3de
commit
2a7feee76d
1 changed files with 1 additions and 0 deletions
|
@ -2396,6 +2396,7 @@ posix_listdir(PyObject *self, PyObject *args)
|
|||
}
|
||||
strcpy(namebuf, PyBytes_AsString(opath));
|
||||
len = PyObject_Size(opath);
|
||||
Py_DECREF(opath);
|
||||
if (len > 0) {
|
||||
char ch = namebuf[len-1];
|
||||
if (ch != SEP && ch != ALTSEP && ch != ':')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue