summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ernberg <john.ernberg@actia.se>2016-04-22 13:10:08 +0000
committerDenis Kenzior <denkenz@gmail.com>2016-04-22 15:36:47 -0500
commit7cea20b680be3027abaf5bb247f41312aa218b11 (patch)
treed85a0f99675b2b83cce6cd7bf029825db93aa803
parent1326026c6da9c2b693d490ab62015aba3f97401c (diff)
downloadofono-7cea20b680be3027abaf5bb247f41312aa218b11.tar.gz
voicecall: Use g_slist_free_full
-rw-r--r--src/voicecall.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index bdad125a..2ff9aa15 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -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;
}
}