From: Antoine Pitrou Date: Wed, 12 Sep 2012 16:01:36 +0000 (+0200) Subject: Issue #15926: Fix crash after multiple reinitializations of the interpreter. X-Git-Tag: v3.3.1rc1~818^2^2~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d20e0edd966431fa63e85ff7c04087de0c9ed7c;p=thirdparty%2FPython%2Fcpython.git Issue #15926: Fix crash after multiple reinitializations of the interpreter. --- diff --git a/Misc/NEWS b/Misc/NEWS index 993bc11b0f7b..d72a9d5f2529 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ What's New in Python 3.3.1 Core and Builtins ----------------- +- Issue #15926: Fix crash after multiple reinitializations of the interpreter. + - Issue #15895: Fix FILE pointer leak in one error branch of PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file, closeit is false an and set_main_loader() fails. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 1f2b0cc0cad6..54f6cd2b22cf 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -11852,7 +11852,6 @@ INITFUNC(void) /* initialize TerminalSize_info */ PyStructSequence_InitType(&TerminalSizeType, &TerminalSize_desc); - Py_INCREF(&TerminalSizeType); } #if defined(HAVE_WAITID) && !defined(__APPLE__) Py_INCREF((PyObject*) &WaitidResultType); @@ -11915,6 +11914,7 @@ INITFUNC(void) #endif /* __APPLE__ */ + Py_INCREF(&TerminalSizeType); PyModule_AddObject(m, "terminal_size", (PyObject*) &TerminalSizeType); billion = PyLong_FromLong(1000000000);