* exceptions.cc (_threadinfo::remove): Avoid returning without unlocking

critical section in the (hopefully impossible) case of an unrecognized thread.
This commit is contained in:
Christopher Faylor 2003-12-07 02:33:31 +00:00
parent 2b6d15a908
commit fcc47fd001
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2003-12-06 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (_threadinfo::remove): Avoid returning without
unlocking critical section in the (hopefully impossible) case of an
unrecognized thread.
2003-12-06 Christopher Faylor <cgf@redhat.com>
* cygtls.h: Add more "don't parse this" guards.

View File

@ -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);
}