summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-19 09:55:44 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-19 09:55:44 (GMT)
commit26c03bd7d5892e6bd7304231c8f10955a73c854d (patch)
treeadf1d1d3450fe4e2d3a71db078cf9528715545d4 /Modules
parent286987bbac8e6138c270ae8863f29a26d38ac977 (diff)
downloadcpython-26c03bd7d5892e6bd7304231c8f10955a73c854d.zip
cpython-26c03bd7d5892e6bd7304231c8f10955a73c854d.tar.gz
cpython-26c03bd7d5892e6bd7304231c8f10955a73c854d.tar.bz2
Fix memory leak in path_converter()
Issue #28200: Replace PyUnicode_AsWideCharString() with PyUnicode_AsUnicodeAndSize().
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index ba54249..470ee92 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;
}