diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-20 19:50:57 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-20 19:50:57 (GMT) |
commit | 5a96b5241f8ff0badd0f2a95305d551e80847f1c (patch) | |
tree | d03c7ab8112769a93108d04b7c0e9e7f5b2ba3da /Python | |
parent | e7606649b3f285c3491a03eb8329ebd44fc8ad0f (diff) | |
download | cpython-5a96b5241f8ff0badd0f2a95305d551e80847f1c.zip cpython-5a96b5241f8ff0badd0f2a95305d551e80847f1c.tar.gz cpython-5a96b5241f8ff0badd0f2a95305d551e80847f1c.tar.bz2 |
Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil
Schemenauer.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 784558c..37c1f11 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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; |