ws2_32: Fix a leak in WS2_AcceptEx.

This commit is contained in:
Bruno Jesus 2011-09-04 11:16:31 -03:00 committed by Alexandre Julliard
parent 94532dbd08
commit 733c7f2c72
1 changed files with 5 additions and 1 deletions

View File

@ -2046,7 +2046,11 @@ static BOOL WINAPI WS2_AcceptEx(SOCKET listener, SOCKET acceptor, PVOID dest, DW
}
SERVER_END_REQ;
if(status != STATUS_PENDING) HeapFree( GetProcessHeap(), 0, wsa );
if(status != STATUS_PENDING)
{
HeapFree( GetProcessHeap(), 0, wsa->read );
HeapFree( GetProcessHeap(), 0, wsa );
}
SetLastError( NtStatusToWSAError(status) );
return FALSE;