Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 704d8b1 commit 7cd068bCopy full SHA for 7cd068b
1 file changed
Python/pythonrun.c
@@ -732,6 +732,7 @@ initstdio(void)
732
}
733
734
encoding = Py_GETENV("PYTHONIOENCODING");
735
+ errors = NULL;
736
if (encoding) {
737
encoding = strdup(encoding);
738
errors = strchr(encoding, ':');
@@ -825,6 +826,8 @@ initstdio(void)
825
826
status = -1;
827
828
829
+ if (encoding)
830
+ free(encoding);
831
Py_XDECREF(bimod);
832
Py_XDECREF(iomod);
833
return status;
0 commit comments