From 9aa1aed489409cc60b1786c12281cbdee430a341 Mon Sep 17 00:00:00 2001 From: himanshu Date: Mon, 24 Feb 2020 15:02:51 +0530 Subject: [PATCH] Fix Memory Leak: The default gatt-client is not freed Change-Id: I24510c410897d85ed25dd2d650113ac857a45b57 Signed-off-by: himanshu --- bt-service-adaptation/services/gatt/bt-service-gatt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bt-service-adaptation/services/gatt/bt-service-gatt.c b/bt-service-adaptation/services/gatt/bt-service-gatt.c index 2a93723..573bdc3 100644 --- a/bt-service-adaptation/services/gatt/bt-service-gatt.c +++ b/bt-service-adaptation/services/gatt/bt-service-gatt.c @@ -504,6 +504,9 @@ void _bt_gatt_deinit(void) { BT_INFO("GATT deinit"); + /* Un-register the default gatt client before */ + __bt_unregister_gatt_client_instance(gatt_default_client); + if (OAL_STATUS_SUCCESS != gatt_disable()) BT_ERR("gatt deinit failed"); -- 2.7.4