>From 2a8b63192f437b9bb5c7c9956299493b9ad215e5 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Rico=20Sch=C3=BCller?= <kgbricola@web.de>
Date: Mon, 31 Dec 2007 00:51:04 +0100
Subject: [PATCH] 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..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

