From: John Ernberg <[email protected]>

---
 src/voicecall.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/voicecall.c b/src/voicecall.c
index c9b1b43..027f03e 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;
        }
 }
-- 
1.9.1
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to