voicecall: Use g_slist_free_full

This commit is contained in:
John Ernberg 2016-04-22 13:10:08 +00:00 committed by Denis Kenzior
parent 1326026c6d
commit 7cea20b680
1 changed files with 2 additions and 5 deletions

View File

@ -2534,9 +2534,7 @@ static void free_sim_ecc_numbers(struct ofono_voicecall *vc, gboolean old_only)
*/
if (old_only == FALSE) {
if (vc->new_sim_en_list) {
g_slist_foreach(vc->new_sim_en_list, (GFunc) g_free,
NULL);
g_slist_free(vc->new_sim_en_list);
g_slist_free_full(vc->new_sim_en_list, g_free);
vc->new_sim_en_list = NULL;
}
@ -2544,8 +2542,7 @@ static void free_sim_ecc_numbers(struct ofono_voicecall *vc, gboolean old_only)
}
if (vc->sim_en_list) {
g_slist_foreach(vc->sim_en_list, (GFunc) g_free, NULL);
g_slist_free(vc->sim_en_list);
g_slist_free_full(vc->sim_en_list, g_free);
vc->sim_en_list = NULL;
}
}