提交 7d179d62 编写于 作者: J Jonathan Chambers

Close event handle in the error case

上级 5c111230
......@@ -861,7 +861,6 @@ gpointer ves_icall_System_Net_Sockets_Socket_Accept_internal(SOCKET sock,
{
/* perform alertable wait on event rather than blocking socket call to avoid deadlock on domain unload */
WSAEVENT hEvent;
int res = 0;
DWORD result = 0;
hEvent = WSACreateEvent ();
......@@ -872,6 +871,7 @@ gpointer ves_icall_System_Net_Sockets_Socket_Accept_internal(SOCKET sock,
if (WSAEventSelect (sock, hEvent, FD_ACCEPT) == SOCKET_ERROR) {
*error = WSAGetLastError ();
WSACloseEvent (hEvent);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册