From 733c7f2c72053590da927e562d6fe9b5f943e610 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Sun, 4 Sep 2011 11:16:31 -0300 Subject: [PATCH] ws2_32: Fix a leak in WS2_AcceptEx. --- dlls/ws2_32/socket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index a51b921caac..64abd931819 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -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;