diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-19 09:55:44 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-19 09:55:44 (GMT) |
commit | 26c03bd7d5892e6bd7304231c8f10955a73c854d (patch) | |
tree | adf1d1d3450fe4e2d3a71db078cf9528715545d4 /Modules | |
parent | 286987bbac8e6138c270ae8863f29a26d38ac977 (diff) | |
download | cpython-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.c | 2 |
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; } |