diff options
author | John Ernberg <john.ernberg@actia.se> | 2016-04-22 13:10:07 +0000 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2016-04-22 15:29:08 -0500 |
commit | ea0999c6262ca477f02e7fcfc7749f503aaf3a10 (patch) | |
tree | 5de3378b17c2a4826b487f2e70a38ad5caf50a0c | |
parent | 1e5725993b746566e928a843daeb01b5073ae19c (diff) | |
download | ofono-ea0999c6262ca477f02e7fcfc7749f503aaf3a10.tar.gz |
modem: Use g_slist_free_full
-rw-r--r-- | src/modem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modem.c b/src/modem.c index a89fa483..b1e8d3e2 100644 --- a/src/modem.c +++ b/src/modem.c @@ -2083,12 +2083,10 @@ static void modem_unregister(struct ofono_modem *modem) modem->sim_watch = 0; modem->sim_ready_watch = 0; - g_slist_foreach(modem->interface_list, (GFunc) g_free, NULL); - g_slist_free(modem->interface_list); + g_slist_free_full(modem->interface_list, g_free); modem->interface_list = NULL; - g_slist_foreach(modem->feature_list, (GFunc) g_free, NULL); - g_slist_free(modem->feature_list); + g_slist_free_full(modem->feature_list, g_free); modem->feature_list = NULL; if (modem->timeout) { |