fusion: Reorder some code to avoid memory leak (coverity)

André Hentschel nerv at dawncrow.de
Sun Oct 28 10:16:35 CDT 2012


CID 713450
---
 dlls/fusion/fusion.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/fusion/fusion.c b/dlls/fusion/fusion.c
index 6ace81f..e79fa3a 100644
--- a/dlls/fusion/fusion.c
+++ b/dlls/fusion/fusion.c
@@ -76,9 +76,9 @@ static HRESULT get_corversion(LPWSTR version, DWORD size)
 
     pGetCORVersion = (void *)GetProcAddress(hmscoree, "GetCORVersion");
     if (!pGetCORVersion)
-        return E_FAIL;
-
-    hr = pGetCORVersion(version, size, &len);
+        hr = E_FAIL;
+    else
+        hr = pGetCORVersion(version, size, &len);
 
     FreeLibrary(hmscoree);
     return hr;
-- 
1.8.0



-- 

Best Regards, André Hentschel


More information about the wine-patches mailing list