Sven Baars : kernelbase: Fix a leak on error path (Coverity).

Alexandre Julliard julliard at winehq.org
Thu Sep 26 15:51:20 CDT 2019


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

Author: Sven Baars <sven.wine at gmail.com>
Date:   Thu Sep 26 21:21:32 2019 +0200

kernelbase: Fix a leak on error path (Coverity).

Signed-off-by: Sven Baars <sven.wine at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernelbase/thread.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c
index f633dfa3de..d60e3b1a47 100644
--- a/dlls/kernelbase/thread.c
+++ b/dlls/kernelbase/thread.c
@@ -868,6 +868,7 @@ LPVOID WINAPI DECLSPEC_HOTPATCH CreateFiberEx( SIZE_T stack_commit, SIZE_T stack
     if ((status = RtlCreateUserStack( stack_commit, stack_reserve, 0, 1, 1, &stack )))
     {
         SetLastError( RtlNtStatusToDosError(status) );
+        HeapFree( GetProcessHeap(), 0, fiber );
         return NULL;
     }
 




More information about the wine-cvs mailing list