From: himanshu Date: Mon, 24 Feb 2020 09:32:51 +0000 (+0530) Subject: Fix Memory Leak: The default gatt-client is not freed X-Git-Tag: submit/tizen/20200226.220348~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F225781%2F1;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Fix Memory Leak: The default gatt-client is not freed Change-Id: I24510c410897d85ed25dd2d650113ac857a45b57 Signed-off-by: himanshu --- 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");