[KERNEL32] Remove a pointless SEH in VirtualAllocEx (#5117)

Win2K3 just wraps in SEH only this syscall, which appears pointless
and was removed since NT6.0. We remove it too as an experiment.
Revert the change that added SEH here from commit 6d97180 (r52899).
This commit is contained in:
Ratin Gao 2023-03-10 00:08:08 +08:00 committed by GitHub
parent 139809b747
commit df7ab5d8f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,22 +37,13 @@ VirtualAllocEx(IN HANDLE hProcess,
return NULL;
}
/* Handle any possible exceptions */
_SEH2_TRY
{
/* Allocate the memory */
Status = NtAllocateVirtualMemory(hProcess,
&lpAddress,
0,
&dwSize,
flAllocationType,
flProtect);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
/* Allocate the memory */
Status = NtAllocateVirtualMemory(hProcess,
&lpAddress,
0,
&dwSize,
flAllocationType,
flProtect);
/* Check for status */
if (!NT_SUCCESS(Status))