summaryrefslogtreecommitdiff
path: root/Modules/getpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r--Modules/getpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c
index b4b33437b6..494fa19bdf 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -140,13 +140,13 @@ _Py_wstat(const wchar_t* path, struct stat *buf)
{
int err;
char *fname;
- fname = Py_EncodeLocale(path, NULL);
+ fname = _Py_EncodeLocaleRaw(path, NULL);
if (fname == NULL) {
errno = EINVAL;
return -1;
}
err = stat(fname, buf);
- PyMem_Free(fname);
+ PyMem_RawFree(fname);
return err;
}