[PATCH] mshtml: Fix memory leak (found by Smatch)

Rico Schüller kgbricola at web.de
Sun Dec 30 17:51:04 CST 2007


---
 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..d29c978 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);
 
-- 
1.5.3.3


--------------010605080709040005090007--



More information about the wine-devel mailing list