diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-07 02:33:31 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-07 02:33:31 +0000 |
commit | fcc47fd0013d63dfe43b81ec26ad10eea5a05cbe (patch) | |
tree | 5614c31297a925f3ca7757c86fc1ff82752ae204 /winsup/cygwin/exceptions.cc | |
parent | 2b6d15a90833dd2e3aa2aa758813e721fe94a0ca (diff) | |
download | cygnal-fcc47fd0013d63dfe43b81ec26ad10eea5a05cbe.tar.gz cygnal-fcc47fd0013d63dfe43b81ec26ad10eea5a05cbe.tar.bz2 cygnal-fcc47fd0013d63dfe43b81ec26ad10eea5a05cbe.zip |
* exceptions.cc (_threadinfo::remove): Avoid returning without unlocking
critical section in the (hopefully impossible) case of an unrecognized thread.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index cb2db165f..aba96ecb0 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -192,13 +192,14 @@ _threadinfo::remove () EnterCriticalSection (&protect_linked_list); for (t = _last_thread; t && t != this; t = t->prev) continue; - if (!t) - return; - t->prev->next = t->next; - if (t->next) - t->next->prev = t->prev; - if (t == _last_thread) - _last_thread = t->prev; + if (t) + { + t->prev->next = t->next; + if (t->next) + t->next->prev = t->prev; + if (t == _last_thread) + _last_thread = t->prev; + } LeaveCriticalSection (&protect_linked_list); } |