Rico Schüller : mshtml: Fix memory leak ( found by Smatch).

Alexandre Julliard julliard at winehq.org
Mon Jan 7 08:39:28 CST 2008


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

Author: Rico Schüller <kgbricola at web.de>
Date:   Mon Dec 31 00:51:04 2007 +0100

mshtml: Fix memory leak (found by Smatch).

---

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

diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index 731af60..1f5777d 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -236,8 +236,10 @@ static BOOL install_from_registered_dir(void)
         res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
     }
     RegCloseKey(hkey);
-    if(res != ERROR_SUCCESS || type != REG_SZ)
+    if(res != ERROR_SUCCESS || type != REG_SZ) {
+        heap_free(file_name);
         return FALSE;
+    }
 
     strcat(file_name, GECKO_FILE_NAME);
 




More information about the wine-cvs mailing list