diff options
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r-- | winsup/cygwin/cygtls.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index c154465e4..1b1ca114b 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -148,10 +148,9 @@ _cygtls::remove (DWORD wait) { /* FIXME: Need some sort of atthreadexit function to allow things like select to control this themselves. */ - if (!locals.select.sockevt) + if (locals.select.sockevt) { - if (locals.select.sockevt) - CloseHandle (locals.select.sockevt); + CloseHandle (locals.select.sockevt); locals.select.sockevt = NULL; free_local (select.ser_num); free_local (select.w4); |