Commit 91eab4e4 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #17051: Fix a memory leak in os.path.isdir() on Windows. Patch by Robert Xiao.

parent 75cbed48
...@@ -200,6 +200,9 @@ Core and Builtins ...@@ -200,6 +200,9 @@ Core and Builtins
Library Library
------- -------
- Issue #17051: Fix a memory leak in os.path.isdir() on Windows. Patch by
Robert Xiao.
- Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase - Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
interface and support all mandatory methods and properties. interface and support all mandatory methods and properties.
......
...@@ -4229,6 +4229,7 @@ posix__isdir(PyObject *self, PyObject *args) ...@@ -4229,6 +4229,7 @@ posix__isdir(PyObject *self, PyObject *args)
return NULL; return NULL;
attributes = GetFileAttributesA(path); attributes = GetFileAttributesA(path);
PyMem_Free(path);
if (attributes == INVALID_FILE_ATTRIBUTES) if (attributes == INVALID_FILE_ATTRIBUTES)
Py_RETURN_FALSE; Py_RETURN_FALSE;
......
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