Kaydet (Commit) 2a7feee7 authored tarafından Stefan Krah's avatar Stefan Krah

Windows: fix leak in posix_listdir.

üst e71362d3
......@@ -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 != ':')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment