[3/7] winhttp: Fix a memory leak.

Hans Leidekker hans at codeweavers.com
Wed Oct 21 06:18:18 CDT 2009


Found by valgrind.
---
 dlls/winhttp/session.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index d5649ed..448603f 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -368,6 +368,7 @@ BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT
     }
     else if (server)
     {
+        heap_free( connect->servername );
         if (!(connect->servername = strdupW( server )))
         {
             ret = FALSE;
-- 
1.6.3.3





More information about the wine-patches mailing list