commit | 26c03bd7d5892e6bd7304231c8f10955a73c854d | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@gmail.com> | Mon Sep 19 11:55:44 2016 +0200 |
committer | Victor Stinner <victor.stinner@gmail.com> | Mon Sep 19 11:55:44 2016 +0200 |
tree | adf1d1d3450fe4e2d3a71db078cf9528715545d4 | |
parent | 286987bbac8e6138c270ae8863f29a26d38ac977 [diff] [blame] |
Fix memory leak in path_converter() Issue #28200: Replace PyUnicode_AsWideCharString() with PyUnicode_AsUnicodeAndSize().
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 @@ if (is_unicode) { #ifdef MS_WINDOWS - wide = PyUnicode_AsWideCharString(o, &length); + wide = PyUnicode_AsUnicodeAndSize(o, &length); if (!wide) { goto exit; }