Hans Leidekker : winhttp: Fix a memory leak.

Alexandre Julliard julliard at winehq.org
Wed Oct 21 13:14:09 CDT 2009


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Oct 21 13:18:18 2009 +0200

winhttp: Fix a memory leak.

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;




More information about the wine-cvs mailing list