summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ernberg <john.ernberg@actia.se>2016-04-22 13:10:06 +0000
committerDenis Kenzior <denkenz@gmail.com>2016-04-22 15:26:34 -0500
commit875968d270681f44ac95c084a5e6fc372ea61e21 (patch)
treeccfeb38da7e372a6f9b5cffa1cbb6d95a36aca38
parent27b3d904ea03b9cb8851472dc2936714777da209 (diff)
downloadofono-875968d270681f44ac95c084a5e6fc372ea61e21.tar.gz
smart-messaging: Use g_slist_free_full
-rw-r--r--plugins/smart-messaging.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/smart-messaging.c b/plugins/smart-messaging.c
index b368917c..bbbdaa9d 100644
--- a/plugins/smart-messaging.c
+++ b/plugins/smart-messaging.c
@@ -216,8 +216,7 @@ static DBusMessage *smart_messaging_send_vcard(DBusConnection *conn,
err = __ofono_sms_txq_submit(sm->sms, msg_list, flags, &uuid,
message_queued, msg);
- g_slist_foreach(msg_list, (GFunc)g_free, NULL);
- g_slist_free(msg_list);
+ g_slist_free_full(msg_list, g_free);
if (err < 0)
return __ofono_error_failed(msg);
@@ -259,8 +258,7 @@ static DBusMessage *smart_messaging_send_vcal(DBusConnection *conn,
err = __ofono_sms_txq_submit(sm->sms, msg_list, flags, &uuid,
message_queued, msg);
- g_slist_foreach(msg_list, (GFunc)g_free, NULL);
- g_slist_free(msg_list);
+ g_slist_free_full(msg_list, g_free);
if (err < 0)
return __ofono_error_failed(msg);