* cygtls.cc (_cygtls::remove): Don't free or close stuff if we're being called

in a "non-standard" way.
This commit is contained in:
Christopher Faylor 2005-04-05 17:13:35 +00:00
parent 4385bf1240
commit 42aa06a575
2 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2005-04-05 Christopher Faylor <cgf@timesys.com>
* cygtls.cc (_cygtls::remove): Don't free or close stuff if we're being
called in a "non-standard" way.
2005-04-05 Christopher Faylor <cgf@timesys.com>
* sync.h (muto::initforce): Delete flawed implementation.

View File

@ -165,15 +165,18 @@ _cygtls::remove (DWORD wait)
debug_printf ("wait %p", wait);
if (!locals.exitsock)
return;
// FIXME: Need some sort of atthreadexit function to allow things like
// select to control this themselves
if (locals.exitsock != INVALID_SOCKET)
closesocket (locals.exitsock);
free_local (process_ident);
free_local (ntoa_buf);
free_local (protoent_buf);
free_local (servent_buf);
free_local (hostent_buf);
if (wait)
{
// FIXME: Need some sort of atthreadexit function to allow things like
// select to control this themselves
if (locals.exitsock != INVALID_SOCKET)
closesocket (locals.exitsock);
free_local (process_ident);
free_local (ntoa_buf);
free_local (protoent_buf);
free_local (servent_buf);
free_local (hostent_buf);
}
do
{