Diff between a7264f9604edff85ddf87937bb4fb1269ee5076b and 7ed42033406158d18b7e9c376de45f2babf19f05

Changed Files

File Additions Deletions Status
src/shared/gatt-client.c +2 -2 modified

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 782e6b3..ddedaf0 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -1224,12 +1224,12 @@ static void bt_gatt_client_free(struct bt_gatt_client *client)
 	bt_att_unregister(client->att, client->notify_id);
 	bt_att_unregister(client->att, client->ind_id);
 
+	gatt_client_clear_services(client);
+
 	queue_destroy(client->svc_chngd_queue, free);
 	queue_destroy(client->long_write_queue, long_write_op_unref);
 	queue_destroy(client->notify_list, notify_data_unref);
 
-	gatt_client_clear_services(client);
-
 	bt_att_unref(client->att);
 	free(client);
 }