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

@ -10,6 +10,9 @@ What's New in Python 3.2 Beta 1?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil
Schemenauer.
- Issue #4925: Add filename to error message when executable can't be found in - Issue #4925: Add filename to error message when executable can't be found in
subprocess. subprocess.

View file

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