Commit 13bb213a authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

advapi32: Hold lock while handling service thread shutdown.

parent 63c36da6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment