mirror of https://github.com/python/cpython
Fix memory leak in path_converter()
Issue #28200: Replace PyUnicode_AsWideCharString() with PyUnicode_AsUnicodeAndSize().
This commit is contained in:
parent
286987bbac
commit
26c03bd7d5
|
@ -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.
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue