Module: wine Branch: master Commit: d48e3a0bead8d5bcc0ea348f392e5dbca60320e7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d48e3a0bead8d5bcc0ea348f39... Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Mar 17 06:23:57 2015 +0100 kernel32: Fix file handle leak in exec_process (Coverity). --- dlls/kernel32/process.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index b371e73..199b2f3 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2493,7 +2493,12 @@ static void exec_process( LPCWSTR name ) /* Determine executable type */ - if (binary_info.flags & BINARY_FLAG_DLL) return; + if (binary_info.flags & BINARY_FLAG_DLL) + { + CloseHandle( hFile ); + return; + } + switch (binary_info.type) { case BINARY_PE: