Commit 3ef8b076 authored by Victor Stinner's avatar Victor Stinner

Fix memory leak in path_converter()

Issue #28200: Replace PyUnicode_AsWideCharString() with
PyUnicode_AsUnicodeAndSize().
parent 33cbdb91
......@@ -29,6 +29,9 @@ Core and Builtins
Library
-------
- Issue #28200: Fix memory leak on Windows in the os module (fix
path_converter() function).
- Issue #25400: RobotFileParser now correctly returns default values for
crawl_delay and request_rate. Initial patch by Peter Wirtz.
......
......@@ -920,7 +920,7 @@ path_converter(PyObject *o, void *p)
if (is_unicode) {
#ifdef MS_WINDOWS
wide = PyUnicode_AsWideCharString(o, &length);
wide = PyUnicode_AsUnicodeAndSize(o, &length);
if (!wide) {
goto exit;
}
......
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