ws2_32: Close the new socket handle on CF_DEFER.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-10-07 23:01:14 -05:00 committed by Alexandre Julliard
parent 567beb6b2e
commit 3d521bc7b9
1 changed files with 1 additions and 0 deletions

View File

@ -3541,6 +3541,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct sockaddr *addr, int *addrlen,
status = NtDeviceIoControlFile( (HANDLE)s, NULL, NULL, NULL, &io, IOCTL_AFD_WINE_DEFER, status = NtDeviceIoControlFile( (HANDLE)s, NULL, NULL, NULL, &io, IOCTL_AFD_WINE_DEFER,
&server_handle, sizeof(server_handle), NULL, 0 ); &server_handle, sizeof(server_handle), NULL, 0 );
closesocket( cs );
SetLastError( status ? RtlNtStatusToDosError( status ) : WSATRY_AGAIN ); SetLastError( status ? RtlNtStatusToDosError( status ) : WSATRY_AGAIN );
return -1; return -1;
} }