summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-10-30 15:43:30 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-10-30 15:43:30 (GMT)
commit3d89751c7aaa243fbc2ac4704ad6a620d65e63f6 (patch)
treec3dbe09adc854e348f71b10c65205a7808915e37 /Python
parent7529afce3c8e0e012738c5671d583beb3b85e270 (diff)
downloadcpython-3d89751c7aaa243fbc2ac4704ad6a620d65e63f6.zip
cpython-3d89751c7aaa243fbc2ac4704ad6a620d65e63f6.tar.gz
cpython-3d89751c7aaa243fbc2ac4704ad6a620d65e63f6.tar.bz2
Merged revisions 85980 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85980 | hirokazu.yamamoto | 2010-10-31 00:08:15 +0900 | 1 line Issue #10157: Fixed refleaks in pythonrun.c. Patch by Stefan Krah. ........
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 3dbe754..c6cf088 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -259,6 +259,7 @@ Py_InitializeEx(int install_sigs)
Py_FatalError("Py_Initialize: can't set preliminary stderr");
PySys_SetObject("stderr", pstderr);
PySys_SetObject("__stderr__", pstderr);
+ Py_DECREF(pstderr);
_PyImport_Init();
@@ -595,6 +596,7 @@ Py_NewInterpreter(void)
Py_FatalError("Py_Initialize: can't set preliminary stderr");
PySys_SetObject("stderr", pstderr);
PySys_SetObject("__stderr__", pstderr);
+ Py_DECREF(pstderr);
_PyImportHooks_Init();
if (initstdio() < 0)
@@ -940,6 +942,7 @@ initstdio(void)
if (encoding != NULL) {
_PyCodec_Lookup(encoding);
}
+ Py_DECREF(encoding_attr);
}
PyErr_Clear(); /* Not a fatal error if codec isn't available */