diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 1f82048..cf93d4b 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
service_list_insert_services(&client->svc_head, &client->svc_tail,
op->result_head, op->result_tail);
+ /* Relinquish ownership of services, as the client now owns them */
+ op->result_head = NULL;
+ op->result_tail = NULL;
+
next:
/* Notify the upper layer of changed services */
if (client->svc_chngd_callback)
client->svc_head = op->result_head;
client->svc_tail = op->result_tail;
- /* Change owner of service list */
+ /* Relinquish ownership of services, as the client now owns them */
op->result_head = NULL;
op->result_tail = NULL;