[Python-checkins] r85981 - in python/branches/release31-maint: Python/pythonrun.c
hirokazu.yamamoto
python-checkins at python.org
Sat Oct 30 17:43:30 CEST 2010
Author: hirokazu.yamamoto
Date: Sat Oct 30 17:43:30 2010
New Revision: 85981
Log:
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.
........
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Python/pythonrun.c
Modified: python/branches/release31-maint/Python/pythonrun.c
==============================================================================
--- python/branches/release31-maint/Python/pythonrun.c (original)
+++ python/branches/release31-maint/Python/pythonrun.c Sat Oct 30 17:43:30 2010
@@ -259,6 +259,7 @@
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_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 @@
if (encoding != NULL) {
_PyCodec_Lookup(encoding);
}
+ Py_DECREF(encoding_attr);
}
PyErr_Clear(); /* Not a fatal error if codec isn't available */
More information about the Python-checkins
mailing list