summaryrefslogtreecommitdiff
path: root/Modules/python.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/python.c')
-rw-r--r--Modules/python.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/python.c b/Modules/python.c
index aaa7fcff22..0ad1130f19 100644
--- a/Modules/python.c
+++ b/Modules/python.c
@@ -43,12 +43,12 @@ main(int argc, char **argv)
fpsetmask(m & ~FP_X_OFL);
#endif
- oldloc = strdup(setlocale(LC_ALL, NULL));
+ oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, "");
for (i = 0; i < argc; i++) {
argv_copy[i] = _Py_char2wchar(argv[i], NULL);
if (!argv_copy[i]) {
- free(oldloc);
+ PyMem_RawFree(oldloc);
fprintf(stderr, "Fatal Python error: "
"unable to decode the command line argument #%i\n",
i + 1);
@@ -59,7 +59,7 @@ main(int argc, char **argv)
argv_copy2[argc] = argv_copy[argc] = NULL;
setlocale(LC_ALL, oldloc);
- free(oldloc);
+ PyMem_RawFree(oldloc);
res = Py_Main(argc, argv_copy);
for (i = 0; i < argc; i++) {
PyMem_RawFree(argv_copy2[i]);