From 1ec0a0ca05064bee1a8a2d07b7ec695353947346 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 1 Apr 2014 13:55:38 +0200 Subject: [PATCH] android/gatt: Cleanup bt_gatt_unregister function This also fix memory leak when destroying gatt_clients queue. --- android/gatt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index bfa43d3a2..75a80a558 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -2127,15 +2127,15 @@ void bt_gatt_unregister(void) { DBG(""); - queue_destroy(gatt_clients, free); - ipc_unregister(hal_ipc, HAL_SERVICE_ID_GATT); hal_ipc = NULL; + queue_destroy(gatt_clients, destroy_gatt_client); + gatt_clients = NULL; + queue_destroy(conn_list, destroy_device); conn_list = NULL; queue_destroy(conn_wait_queue, destroy_device); conn_wait_queue = NULL; - } -- 2.47.3