If a thread group with no running threads is deconfigured,
it was freed before fetching the next node in the linked list.
This rare bug caused a crash in unit tests in OpenBSD.
ASSERT_DIE(new->default_thread_group);
default_thread_group = new->default_thread_group->group;
- WALK_TLIST(thread_group, gpub, &global_thread_group_list)
+ WALK_TLIST_DELSAFE(thread_group, gpub, &global_thread_group_list)
{
bool run_thread_dropper = false;
TLIST_LIST(birdloop) *leftover_loops = NULL;