Nikolay Sivov : mscoree: Free argument buffer on error (Coverity).

Alexandre Julliard julliard at winehq.org
Fri Dec 23 13:54:00 CST 2016


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Dec 22 13:23:22 2016 +0300

mscoree: Free argument buffer on error (Coverity).

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mscoree/corruntimehost.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index 86eb759..eed96da 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));
 




More information about the wine-cvs mailing list