File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ Py_InitializeEx(int install_sigs)
283283 Py_FatalError ("Py_Initialize: can't set preliminary stderr" );
284284 PySys_SetObject ("stderr" , pstderr );
285285 PySys_SetObject ("__stderr__" , pstderr );
286+ Py_DECREF (pstderr );
286287
287288 _PyImport_Init ();
288289
@@ -605,6 +606,7 @@ Py_NewInterpreter(void)
605606 Py_FatalError ("Py_Initialize: can't set preliminary stderr" );
606607 PySys_SetObject ("stderr" , pstderr );
607608 PySys_SetObject ("__stderr__" , pstderr );
609+ Py_DECREF (pstderr );
608610
609611 _PyImportHooks_Init ();
610612 if (initstdio () < 0 )
@@ -971,6 +973,7 @@ initstdio(void)
971973 if (encoding != NULL ) {
972974 _PyCodec_Lookup (encoding );
973975 }
976+ Py_DECREF (encoding_attr );
974977 }
975978 PyErr_Clear (); /* Not a fatal error if codec isn't available */
976979
You can’t perform that action at this time.
0 commit comments