Commit b12bf4d8 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Unmap main image even if not loaded at base address.

parent aab6ebb7
...@@ -1872,7 +1872,7 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void) ...@@ -1872,7 +1872,7 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void)
env[env_pos++] = 0; env[env_pos++] = 0;
status = load_main_exe( main_wargv[0], main_argv[0], curdir, &image, &module, &image_info ); status = load_main_exe( main_wargv[0], main_argv[0], curdir, &image, &module, &image_info );
if (!status && image_info.Machine != current_machine) /* need to restart for Wow64 */ if (status >= 0 && image_info.Machine != current_machine) /* need to restart for Wow64 */
{ {
NtUnmapViewOfSection( GetCurrentProcess(), module ); NtUnmapViewOfSection( GetCurrentProcess(), module );
status = STATUS_INVALID_IMAGE_FORMAT; status = STATUS_INVALID_IMAGE_FORMAT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment