mscoree: Remove superfluous NULL pointer checks before free (Smatch)

Michael Stefaniuc mstefani at redhat.de
Sun Jan 15 17:17:31 CST 2012


---
 dlls/mscoree/corruntimehost.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index 5042f20..00966ee 100644
--- a/dlls/mscoree/corruntimehost.c
+++ b/dlls/mscoree/corruntimehost.c
@@ -609,14 +609,10 @@ static HRESULT WINAPI CLRRuntimeHost_ExecuteInDefaultAppDomain(ICLRRuntimeHost*
     }
 
 cleanup:
-    if(filenameA)
-        HeapFree(GetProcessHeap(), 0, filenameA);
-    if(classA)
-        HeapFree(GetProcessHeap(), 0, classA);
-    if(argsA)
-        HeapFree(GetProcessHeap(), 0, argsA);
-    if(methodA)
-        HeapFree(GetProcessHeap(), 0, methodA);
+    HeapFree(GetProcessHeap(), 0, filenameA);
+    HeapFree(GetProcessHeap(), 0, classA);
+    HeapFree(GetProcessHeap(), 0, argsA);
+    HeapFree(GetProcessHeap(), 0, methodA);
 
     return hr;
 }
-- 
1.7.6.5



More information about the wine-patches mailing list