diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5ea035e4a..72dbee567 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Mon Jun 4 0:14:00 2001 Corinna Vinschen + + * net.cc (wsock_event): Add destructor. + Sun Jun 3 09:49:55 2001 Robert Collins * dlfcn.cc (dlclose): Do not call FreeLibrary if the symbol to close diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 5fbc92e8d..177ae7a2d 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -52,6 +52,12 @@ class wsock_event WSAOVERLAPPED ovr; public: wsock_event () : event (NULL) {}; + ~wsock_event () + { + if (event) + WSACloseEvent (event); + event = NULL; + }; LPWSAOVERLAPPED prepare (); int wait (int socket, LPDWORD flags);