advapi32: Hold lock while handling service thread shutdown.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
63c36da6da
commit
13bb213aeb
|
@ -625,8 +625,11 @@ static BOOL service_run_main_thread(void)
|
|||
}
|
||||
else if (ret < n)
|
||||
{
|
||||
services[wait_services[ret]]->thread = 0;
|
||||
CloseHandle( wait_handles[ret] );
|
||||
i = wait_services[ret];
|
||||
EnterCriticalSection( &service_cs );
|
||||
CloseHandle( services[i]->thread );
|
||||
services[i]->thread = NULL;
|
||||
LeaveCriticalSection( &service_cs );
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue