Bruno Jesus : ws2_32: Fix a leak in WS2_AcceptEx.

Alexandre Julliard julliard at winehq.org
Mon Sep 5 13:26:19 CDT 2011


Module: wine
Branch: master
Commit: 733c7f2c72053590da927e562d6fe9b5f943e610
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=733c7f2c72053590da927e562d6fe9b5f943e610

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Sun Sep  4 11:16:31 2011 -0300

ws2_32: Fix a leak in WS2_AcceptEx.

---

 dlls/ws2_32/socket.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index a51b921..64abd93 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;




More information about the wine-cvs mailing list