changeset: 103956:6232e610e310 branch: 3.6 parent: 103954:c1d9052996f1 user: Victor Stinner date: Mon Sep 19 11:55:44 2016 +0200 files: Misc/NEWS Modules/posixmodule.c description: Fix memory leak in path_converter() Issue #28200: Replace PyUnicode_AsWideCharString() with PyUnicode_AsUnicodeAndSize(). diff -r c1d9052996f1 -r 6232e610e310 Misc/NEWS --- a/Misc/NEWS Sun Sep 18 23:49:51 2016 -0700 +++ b/Misc/NEWS Mon Sep 19 11:55:44 2016 +0200 @@ -29,6 +29,9 @@ 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 -r c1d9052996f1 -r 6232e610e310 Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Sep 18 23:49:51 2016 -0700 +++ b/Modules/posixmodule.c Mon Sep 19 11:55:44 2016 +0200 @@ -920,7 +920,7 @@ if (is_unicode) { #ifdef MS_WINDOWS - wide = PyUnicode_AsWideCharString(o, &length); + wide = PyUnicode_AsUnicodeAndSize(o, &length); if (!wide) { goto exit; }