diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-20 19:50:57 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-20 19:50:57 +0000 |
commit | 75596c7d735b7520f34bb96e70effcb6b0d1cb24 (patch) | |
tree | 419524bd4f86a095baeb05039af8c275bdab7458 /Python/pythonrun.c | |
parent | 070c4f4b78d1784dac67773a55b1e8f225f5b21a (diff) | |
download | cpython-75596c7d735b7520f34bb96e70effcb6b0d1cb24.tar.gz |
Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil
Schemenauer.
Diffstat (limited to 'Python/pythonrun.c')
-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 784558c119..37c1f1197a 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; |