if (req->device)
btd_device_unref(req->device);
g_slist_free_full(req->profiles_added, g_free);
- g_slist_free(req->profiles_removed);
+ g_slist_free_full(req->profiles_removed, g_free);
if (req->records)
sdp_list_free(req->records, (sdp_free_func_t) sdp_record_free);
g_slist_append(req->profiles_added,
profile_uuid);
else {
+ l = g_slist_find_custom(req->profiles_removed,
+ profile_uuid,
+ (GCompareFunc) strcmp);
+ g_free(l->data);
req->profiles_removed =
- g_slist_remove(req->profiles_removed,
- l->data);
+ g_slist_delete_link(req->profiles_removed, l);
g_free(profile_uuid);
}
for (l = req->device->uuids; l; l = l->next)
req->profiles_removed = g_slist_append(req->profiles_removed,
- l->data);
+ g_strdup(l->data));
}
static void store_services(struct btd_device *device)