smart-messaging: Use g_slist_free_full

This commit is contained in:
John Ernberg 2016-04-22 13:10:06 +00:00 committed by Denis Kenzior
parent 27b3d904ea
commit 875968d270
1 changed files with 2 additions and 4 deletions

View File

@ -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);