static void hog_free(void *data) { struct bt_hog *hog = data; bt_hog_detach(hog); g_slist_free_full(hog->instances, hog_free); bt_scpp_unref(hog->scpp); bt_dis_unref(hog->dis); bt_bas_unref(hog->bas); bt_uhid_unref(hog->uhid); g_slist_free_full(hog->reports, report_free); g_free(hog->name); g_free(hog->primary); g_free(hog); }
static void destroy_gatt_req(struct gatt_request *req) { queue_remove(req->scpp->gatt_op, req); bt_scpp_unref(req->scpp); free(req); }