server: Release correct sockets in poll_socket().

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2022-01-25 14:44:26 +03:00 committed by Alexandre Julliard
parent f0cb616fd9
commit 0839773db2
1 changed files with 1 additions and 1 deletions

View File

@ -3046,7 +3046,7 @@ static void poll_socket( struct sock *poll_sock, struct async *async, int exclus
req->sockets[i].sock = (struct sock *)get_handle_obj( current->process, sockets[i].socket, 0, &sock_ops );
if (!req->sockets[i].sock)
{
for (j = 0; j < i; ++j) release_object( req->sockets[i].sock );
for (j = 0; j < i; ++j) release_object( req->sockets[j].sock );
if (req->timeout) remove_timeout_user( req->timeout );
free( req );
return;