thread: Don't hold mutex when calling cleanup handlers while terminating
authorTobias Brunner <tobias@strongswan.org>
Wed, 13 Apr 2016 09:58:32 +0000 (11:58 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 13 Apr 2016 11:55:20 +0000 (13:55 +0200)
commit960632ffb07ebd266110531360cb8bcc62a0466a
tree18989813fa81a6ef0dfca8052c00eadeabdeb15a
parent0ff486f5076806b26d406509927345e5909ee2f5
thread: Don't hold mutex when calling cleanup handlers while terminating

This could interfere with cleanup handlers that try to acquire
mutexes while other threads holding these try to e.g. cancel the threads.

As cleanup handlers are only queued by the threads themselves we don't need
any synchronization to access the list.

Fixes #1401.
src/libstrongswan/threading/thread.c