mirror of git://git.sysmocom.de/ofono
voicecall: Use g_slist_free_full
This commit is contained in:
parent
1326026c6d
commit
7cea20b680
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue