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

Michael Stefaniuc mstefani at redhat.de
Fri May 9 18:30:05 CDT 2008


---
 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)
-- 
1.5.5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080510/f14e3fbf/attachment.pgp 


More information about the wine-patches mailing list