list_iterate_safe(itr, save, &channels) {
ch = list_get_entry(itr, channel_t, flatlist_node);
Log_debug("Free channel '%s'", ch->name);
free(ch->name);
if (ch->desc)
free(ch->desc);
list_iterate_safe(itr, save, &channels) {
ch = list_get_entry(itr, channel_t, flatlist_node);
Log_debug("Free channel '%s'", ch->name);
free(ch->name);
if (ch->desc)
free(ch->desc);