ws2_32: Don't leak hostname (Coverity)

André Hentschel nerv at dawncrow.de
Sat Jan 4 11:36:34 CST 2014


1147952
---
 dlls/ws2_32/socket.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 0391554..34490c9 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5477,6 +5477,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr
         if (punixhints->ai_socktype < 0)
         {
             WSASetLastError(WSAESOCKTNOSUPPORT);
+            HeapFree(GetProcessHeap(), 0, hostname);
             return SOCKET_ERROR;
         }
 
-- 
1.8.1.2




More information about the wine-patches mailing list