ntdll/tests: Always remove hook trampoline in test_kiuserexceptiondispatcher().

As it is not removed by the hook itself if the hook is not called in the last
test.

Fixes test failures on Win 2003.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2020-08-13 12:59:18 +03:00 committed by Alexandre Julliard
parent 0fa4613811
commit d4052e0d70
1 changed files with 3 additions and 0 deletions

View File

@ -1886,6 +1886,9 @@ static void test_kiuserexceptiondispatcher(void)
ok(got_exception, "Handler was not called.\n");
ok(hook_called || broken(!hook_called) /* 2003 */, "Hook was not called.\n");
memcpy(pKiUserExceptionDispatcher, saved_KiUserExceptionDispatcher_bytes,
sizeof(saved_KiUserExceptionDispatcher_bytes));
RemoveVectoredExceptionHandler(vectored_handler);
ret = VirtualProtect(pKiUserExceptionDispatcher, sizeof(saved_KiUserExceptionDispatcher_bytes),
old_protect2, &old_protect2);