From 066ccd12752a830f44d22c3f1d4c6a48814aabde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Mon, 31 Dec 2007 00:51:04 +0100 Subject: [PATCH] mshtml: Fix memory leak (found by Smatch). --- dlls/mshtml/install.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index 731af6059fe..1f5777d1029 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);