Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil

Schemenauer.
This commit is contained in:
Antoine Pitrou 2010-11-20 19:50:57 +00:00
parent e7606649b3
commit 5a96b5241f
2 changed files with 5 additions and 0 deletions

View file

@ -893,8 +893,10 @@ initstdio(void)
/* Set builtins.open */
if (PyObject_SetAttrString(bimod, "open", wrapper) == -1) {
Py_DECREF(wrapper);
goto error;
}
Py_DECREF(wrapper);
encoding = Py_GETENV("PYTHONIOENCODING");
errors = NULL;