summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/posixmodule.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index e26a5c05ab..0a021ea155 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index ba54249684..470ee92fa1 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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;
}