Don't flush the chanopt_list when saving it

Closes #1665
Fixes #1134
This commit is contained in:
LemonBoy
2016-03-29 19:38:34 +02:00
committed by Patrick Griffis
parent 5f2d6a3c11
commit 0635e91dd6
5 changed files with 16 additions and 10 deletions

View File

@@ -396,7 +396,7 @@ chanopt_save_one_channel (chanopt_in_memory *co, int fh)
}
void
chanopt_save_all (void)
chanopt_save_all (gboolean flush)
{
int i;
int num_saved;
@@ -438,15 +438,21 @@ chanopt_save_all (void)
}
cont:
g_free (co->network);
g_free (co->channel);
g_free (co);
if (flush)
{
g_free (co->network);
g_free (co->channel);
g_free (co);
}
}
close (fh);
g_slist_free (chanopt_list);
chanopt_list = NULL;
if (flush)
{
g_slist_free (chanopt_list);
chanopt_list = NULL;
}
chanopt_open = FALSE;
chanopt_changed = FALSE;