Alexandre Julliard : ntdll: Avoid closing an invalid handle on process creation failure.
Module: wine Branch: master Commit: 4e6c1dff5859ab9e02446c54dc436480d1859472 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4e6c1dff5859ab9e02446c54d... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 27 13:05:01 2020 +0100 ntdll: Avoid closing an invalid handle on process creation failure. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c index ad15a5cf66d..57bb8002dfa 100644 --- a/dlls/ntdll/unix/process.c +++ b/dlls/ntdll/unix/process.c @@ -406,6 +406,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, HANDLE *handle, pe_image OBJECT_ATTRIBUTES attr; IO_STATUS_BLOCK io; + *handle = 0; memset( info, 0, sizeof(*info) ); InitializeObjectAttributes( &attr, path, OBJ_CASE_INSENSITIVE, 0, 0 ); if ((status = NtOpenFile( handle, GENERIC_READ, &attr, &io, @@ -422,7 +423,6 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, HANDLE *handle, pe_image #else info->cpu = client_cpu; #endif - *handle = 0; return STATUS_SUCCESS; } return status;
participants (1)
-
Alexandre Julliard