Michael Stefaniuc : shdocvw: Plug memory leak introduced in 1.0-rc1 (Smatch ).

Alexandre Julliard julliard at winehq.org
Mon May 12 07:12:19 CDT 2008


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Sat May 10 01:30:05 2008 +0200

shdocvw: Plug memory leak introduced in 1.0-rc1 (Smatch).

---

 dlls/shdocvw/factory.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/shdocvw/factory.c b/dlls/shdocvw/factory.c
index 69cbaa3..85b59db 100644
--- a/dlls/shdocvw/factory.c
+++ b/dlls/shdocvw/factory.c
@@ -293,6 +293,7 @@ static BOOL check_native_ie(void)
 {
     static const WCHAR cszPath[] = {'b','r','o','w','s','e','u','i','.','d','l','l',0};
     DWORD handle,size;
+    BOOL ret = TRUE;
 
     size = GetFileVersionInfoSizeW(cszPath,&handle);
     if (size)
@@ -308,10 +309,12 @@ static BOOL check_native_ie(void)
 
         if (VerQueryValueW(buf, cszFD, (LPVOID*)&lpFileDescription, &dwBytes) &&
             strstrW(lpFileDescription,cszWine))
-                return FALSE;
+                ret = FALSE;
+
+        HeapFree(GetProcessHeap(), 0, buf);
     }
 
-    return TRUE;
+    return ret;
 }
 
 DWORD register_iexplore(BOOL doregister)




More information about the wine-cvs mailing list