[New-bugs-announce] [issue28200] Windows: path_converter() leaks memory for Unicode filenames

STINNER Victor report at bugs.python.org
Sun Sep 18 18:56:38 EDT 2016


New submission from STINNER Victor:

Memory leak spotted by the issue #28195: path_converter() calls PyUnicode_AsWideCharString() which allocates a new buffer at each call, but this buffer is never released.

On Python 3.5, PyUnicode_AsWideCharString() was used which handles internally the memory buffer and so release the memory later.

Attached patch fixes the regression introduced in Python 3.6 beta 1 by the change e20c7d8a8187 ("Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)").

----------
files: path_converter.patch
keywords: patch
messages: 276924
nosy: haypo, steve.dower
priority: normal
severity: normal
status: open
title: Windows: path_converter() leaks memory for Unicode filenames
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44744/path_converter.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28200>
_______________________________________


More information about the New-bugs-announce mailing list