mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Don't call WSAEventSelect() on -1
If g_io_win32_sock_close() has been called on a socket channel, don't later in g_io_win32_free() call WSAEventSelect() on its fd which has been set to -1.
This commit is contained in:
parent
0d6b1ab42a
commit
3c57a6c7cc
@ -1137,7 +1137,8 @@ g_io_win32_free (GIOChannel *channel)
|
||||
g_free (emsg);
|
||||
}
|
||||
|
||||
if (win32_channel->type == G_IO_WIN32_SOCKET)
|
||||
if (win32_channel->type == G_IO_WIN32_SOCKET &&
|
||||
win32_channel->fd != -1)
|
||||
if (WSAEventSelect (win32_channel->fd, NULL, 0) == SOCKET_ERROR)
|
||||
if (win32_channel->debug)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user