Michael Stefaniuc : mshtml: Fix a memory leak on an error path (Smatch).

Alexandre Julliard julliard at winehq.org
Mon Sep 17 14:06:32 CDT 2012


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Sun Sep 16 15:22:29 2012 +0200

mshtml: Fix a memory leak on an error path (Smatch).

---

 dlls/mshtml/navigate.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index a15be0e..15c9e85 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -769,8 +769,10 @@ static void query_http_info(nsChannelBSC *This, IWinInetHttpInfo *wininet_info)
         return;
 
     IWinInetHttpInfo_QueryInfo(wininet_info, HTTP_QUERY_RAW_HEADERS_CRLF, buf, &len, NULL, NULL);
-    if(!len)
+    if(!len) {
+        heap_free(buf);
         return;
+    }
 
     ptr = strchrW(buf, '\r');
     if(ptr && ptr[1] == '\n') {




More information about the wine-cvs mailing list