[icinga-checkins] icinga.org: icinga2/master: Clear current thread state before destroying the thread state object.

git at icinga.org git at icinga.org
Thu Feb 14 16:19:07 CET 2013


Module: icinga2
Branch: master
Commit: 4a89f6999095f3e8669d51e42b4bdb6f39efd7fe
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=4a89f6999095f3e8669d51e42b4bdb6f39efd7fe

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Feb 14 16:02:43 2013 +0100

Clear current thread state before destroying the thread state object.

---

 lib/python/pythoninterpreter.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/python/pythoninterpreter.cpp b/lib/python/pythoninterpreter.cpp
index 63f31e0..d56bdff 100644
--- a/lib/python/pythoninterpreter.cpp
+++ b/lib/python/pythoninterpreter.cpp
@@ -40,6 +40,8 @@ PythonInterpreter::~PythonInterpreter(void)
 {
 	PyEval_AcquireLock();
 
+	(void) PyThreadState_Swap(NULL);
+
 	PyThreadState_Clear(m_ThreadState);
 	PyThreadState_Delete(m_ThreadState);
 





More information about the icinga-checkins mailing list