[PATCH] mscoree: Free argument buffer on error (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Thu Dec 22 04:23:22 CST 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/mscoree/corruntimehost.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index 86eb759710..eed96da2cd 100644
--- a/dlls/mscoree/corruntimehost.c
+++ b/dlls/mscoree/corruntimehost.c
@@ -1423,7 +1423,10 @@ __int32 WINAPI _CorExeMain(void)
 
     filenameA = WtoA(filename);
     if (!filenameA)
+    {
+        HeapFree(GetProcessHeap(), 0, argv);
         return -1;
+    }
 
     FixupVTable(GetModuleHandleW(NULL));
 
-- 
2.11.0




More information about the wine-patches mailing list