diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 3dbe754..c6cf088 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -259,6 +259,7 @@ Py_InitializeEx(int install_sigs) Py_FatalError("Py_Initialize: can't set preliminary stderr"); PySys_SetObject("stderr", pstderr); PySys_SetObject("__stderr__", pstderr); + Py_DECREF(pstderr); _PyImport_Init(); @@ -595,6 +596,7 @@ Py_NewInterpreter(void) Py_FatalError("Py_Initialize: can't set preliminary stderr"); PySys_SetObject("stderr", pstderr); PySys_SetObject("__stderr__", pstderr); + Py_DECREF(pstderr); _PyImportHooks_Init(); if (initstdio() < 0) @@ -940,6 +942,7 @@ initstdio(void) if (encoding != NULL) { _PyCodec_Lookup(encoding); } + Py_DECREF(encoding_attr); } PyErr_Clear(); /* Not a fatal error if codec isn't available */ |