commit | fff47ab342e79d02cf871980987b8b30b2f09c37 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Wed Jan 18 15:28:38 2012 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Wed Jan 18 15:28:38 2012 +0100 |
tree | e5861b42315d672b41a9ea0127b0ee9b109321c9 | |
parent | c5e1199f3865a2671e3ce16c6265aa869466356b [diff] | |
parent | 2fabface500d74457593b55ed06bc41ead88163e [diff] |
Fix a memory leak when initializing the standard I/O streams.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 761110a..bff04de 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c
@@ -1032,7 +1032,8 @@ const char * encoding; encoding = _PyUnicode_AsString(encoding_attr); if (encoding != NULL) { - _PyCodec_Lookup(encoding); + PyObject *codec_info = _PyCodec_Lookup(encoding); + Py_XDECREF(codec_info); } Py_DECREF(encoding_attr); }