diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-28 20:19:50 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-28 20:19:50 +0200 |
commit | 46f5b35bc0d680501629f75a86e40ee4b5798ed7 (patch) | |
tree | 5177926695a9a72a23fcf13e9d26e04980e5dfff | |
parent | 80a0a1e170be079aeafd0ac4d113adbcb5fa6f18 (diff) | |
download | cpython-git-46f5b35bc0d680501629f75a86e40ee4b5798ed7.tar.gz |
Issue #17051: Fix a memory leak in os.path.isdir() on Windows. Patch by Robert Xiao.
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/posixmodule.c | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -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. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index d2742a0ee1..776c7c6fb6 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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; |