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

This commit is contained in:
Serhiy Storchaka 2013-01-28 20:19:50 +02:00
parent 80a0a1e170
commit 46f5b35bc0
2 changed files with 4 additions and 0 deletions

View File

@ -200,6 +200,9 @@ Core and Builtins
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
interface and support all mandatory methods and properties.

View File

@ -4229,6 +4229,7 @@ posix__isdir(PyObject *self, PyObject *args)
return NULL;
attributes = GetFileAttributesA(path);
PyMem_Free(path);
if (attributes == INVALID_FILE_ATTRIBUTES)
Py_RETURN_FALSE;