diff options
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 0ba8646ab5..5766b2385e 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -502,6 +502,12 @@ Py_Finalize(void) /* Cleanup Unicode implementation */ _PyUnicode_Fini(); + /* reset file system default encoding */ + if (!Py_HasFileSystemDefaultEncoding) { + free((char*)Py_FileSystemDefaultEncoding); + Py_FileSystemDefaultEncoding = NULL; + } + /* XXX Still allocated: - various static ad-hoc pointers to interned strings - int and float free list blocks |