diff options
author | John Ernberg <john.ernberg@actia.se> | 2016-04-22 13:10:06 +0000 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2016-04-22 15:21:39 -0500 |
commit | 397102bdc5b24773b2a11d860cf7c095c5fd731d (patch) | |
tree | 976a7c9e947d4e4047b6b0e860ce606d173a557f | |
parent | 2db09e4e3f0bdde1bbea9b9542fc047ec3d6f0eb (diff) | |
download | ofono-397102bdc5b24773b2a11d860cf7c095c5fd731d.tar.gz |
rilmodem: Use g_slist_free_full
-rw-r--r-- | drivers/rilmodem/voicecall.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rilmodem/voicecall.c b/drivers/rilmodem/voicecall.c index 8515ebbd..b7180b90 100644 --- a/drivers/rilmodem/voicecall.c +++ b/drivers/rilmodem/voicecall.c @@ -302,8 +302,7 @@ no_calls: } } - g_slist_foreach(vd->calls, (GFunc) g_free, NULL); - g_slist_free(vd->calls); + g_slist_free_full(vd->calls, g_free); vd->calls = calls; vd->local_release = 0; @@ -848,8 +847,7 @@ void ril_voicecall_remove(struct ofono_voicecall *vc) if (vd->clcc_source) g_source_remove(vd->clcc_source); - g_slist_foreach(vd->calls, (GFunc) g_free, NULL); - g_slist_free(vd->calls); + g_slist_free_full(vd->calls, g_free); ofono_voicecall_set_data(vc, NULL); |