aboutsummaryrefslogtreecommitdiffstats
path: root/attrib/client.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2011-06-29 11:52:49 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-06-30 12:32:19 +0300
commit05cb01fc321051e168ee8dc8a798bebea770bbcd (patch)
treedeb7d925820d56fd83d4efc180a479a43cb490a5 /attrib/client.c
parent3058efa787165004b182a6571c53842f656d2e57 (diff)
downloadbluez-05cb01fc321051e168ee8dc8a798bebea770bbcd.tar.gz
bluez-05cb01fc321051e168ee8dc8a798bebea770bbcd.tar.xz
bluez-05cb01fc321051e168ee8dc8a798bebea770bbcd.zip
Make use of g_slist_free_full on attrib
Diffstat (limited to 'attrib/client.c')
-rw-r--r--attrib/client.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/attrib/client.c b/attrib/client.c
index 71df532c..c9629c40 100644
--- a/attrib/client.c
+++ b/attrib/client.c
@@ -140,8 +140,7 @@ static void primary_free(void *user_data)
g_dbus_remove_watch(prim->gatt->conn, watcher->id);
}
- g_slist_foreach(prim->chars, (GFunc) characteristic_free, NULL);
- g_slist_free(prim->chars);
+ g_slist_free_full(prim->chars, characteristic_free);
g_free(prim->path);
g_free(prim);
}
@@ -150,8 +149,7 @@ static void gatt_service_free(void *user_data)
{
struct gatt_service *gatt = user_data;
- g_slist_foreach(gatt->primary, (GFunc) primary_free, NULL);
- g_slist_free(gatt->primary);
+ g_slist_free_full(gatt->primary, primary_free);
g_attrib_unref(gatt->attrib);
g_free(gatt->path);
btd_device_unref(gatt->dev);