ntdll: Avoid crash on shutting down partially initialized thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 364099f528
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
d1d979bf91
commit
a59337fb7e
|
@ -3230,7 +3230,7 @@ void WINAPI LdrShutdownThread(void)
|
|||
if (wm->ldr.TlsIndex != -1) call_tls_callbacks( wm->ldr.DllBase, DLL_THREAD_DETACH );
|
||||
|
||||
RtlAcquirePebLock();
|
||||
RemoveEntryList( &NtCurrentTeb()->TlsLinks );
|
||||
if (NtCurrentTeb()->TlsLinks.Flink) RemoveEntryList( &NtCurrentTeb()->TlsLinks );
|
||||
if ((pointers = NtCurrentTeb()->ThreadLocalStoragePointer))
|
||||
{
|
||||
for (i = 0; i < tls_module_count; i++) RtlFreeHeap( GetProcessHeap(), 0, pointers[i] );
|
||||
|
|
Loading…
Reference in New Issue