Alexandre Julliard : ntdll: Avoid closing an invalid handle on process creation failure.
Alexandre Julliard
julliard at winehq.org
Fri Nov 27 16:04:38 CST 2020
Module: wine
Branch: master
Commit: 4e6c1dff5859ab9e02446c54dc436480d1859472
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4e6c1dff5859ab9e02446c54dc436480d1859472
Author: Alexandre Julliard <julliard at 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 at 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;
More information about the wine-cvs
mailing list