diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-04-18 12:38:42 +0200 |
---|---|---|
committer | David Ostrovsky <David.Ostrovsky@gmx.de> | 2013-04-18 16:27:16 +0000 |
commit | 1fb53a637597f76bea86514b62ddfad34f60c889 (patch) | |
tree | 80f34d9e211f95423751ca0d81ca18c661060417 /pyuno/source | |
parent | b7d21a801567ad3b6b45c772978d588d05409335 (diff) |
pyuno_loader::CreateInstance: delete the initial PyThreadState
Don't see how it could be used again, it appears to be leaked
and causes the assertion in PyThreadState_Swap to fire.
Change-Id: Id6bbb4363928e4fdd8bda1905f6e1f9931dba74c
Reviewed-on: https://gerrit.libreoffice.org/3452
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Diffstat (limited to 'pyuno/source')
-rw-r--r-- | pyuno/source/loader/pyuno_loader.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index 0db1b9b59023..718edc744b46 100644 --- a/pyuno/source/loader/pyuno_loader.cxx +++ b/pyuno/source/loader/pyuno_loader.cxx @@ -223,6 +223,10 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c PyThreadState *tstate = PyThreadState_Get(); PyEval_ReleaseThread( tstate ); + // This tstate is never used again, so delete it here. + // This prevents an assertion in PyThreadState_Swap on the + // PyThreadAttach below. + PyThreadState_Delete(tstate); } PyThreadAttach attach( PyInterpreterState_Head() ); |