mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil
Schemenauer.
This commit is contained in:
parent
e7606649b3
commit
5a96b5241f
2 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue