ntdll: Don't call possibly deadly DbgUiGetThreadDebugObject.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-03-16 20:28:09 +01:00 committed by Alexandre Julliard
parent 5590ea4a6e
commit 4d5824112e
1 changed files with 2 additions and 1 deletions

View File

@ -3215,7 +3215,8 @@ void WINAPI LdrShutdownThread(void)
RtlReleasePebLock(); RtlReleasePebLock();
RtlLeaveCriticalSection( &loader_section ); RtlLeaveCriticalSection( &loader_section );
if (DbgUiGetThreadDebugObject()) NtClose( DbgUiGetThreadDebugObject() ); /* don't call DbgUiGetThreadDebugObject as some apps hook it and terminate if called */
if (NtCurrentTeb()->DbgSsReserved[1]) NtClose( NtCurrentTeb()->DbgSsReserved[1] );
RtlFreeThreadActivationContextStack(); RtlFreeThreadActivationContextStack();
} }