projects
/
dana
/
cg-glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d6b1ab
)
Don't call WSAEventSelect() on -1
author
Tor Lillqvist
<tml@iki.fi>
Wed, 4 Nov 2009 21:59:18 +0000
(23:59 +0200)
committer
Tor Lillqvist
<tml@iki.fi>
Wed, 4 Nov 2009 22:04:33 +0000
(
00:04
+0200)
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.
glib/giowin32.c
patch
|
blob
|
history
diff --git
a/glib/giowin32.c
b/glib/giowin32.c
index
d638544
..
d661865
100644
(file)
--- a/
glib/giowin32.c
+++ b/
glib/giowin32.c
@@
-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)
{