Fix Memory Leak: The default gatt-client is not freed 81/225781/1
authorhimanshu <h.himanshu@samsung.com>
Mon, 24 Feb 2020 09:32:51 +0000 (15:02 +0530)
committerhimanshu <h.himanshu@samsung.com>
Mon, 24 Feb 2020 10:01:58 +0000 (15:31 +0530)
Change-Id: I24510c410897d85ed25dd2d650113ac857a45b57
Signed-off-by: himanshu <h.himanshu@samsung.com>
bt-service-adaptation/services/gatt/bt-service-gatt.c

index 2a93723..573bdc3 100644 (file)
@@ -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");