This patch fixes crash issue occuring due to access of freed
gatt client pointer.
Change-Id: I064ea4bd624373fde9bbb74923eebd2dc1d081d8
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
g_dbus_remove_watch(btd_get_dbus_connection(), client->watch);
bt_gatt_client_unregister_notify(client->chrc->service->client->gatt,
client->notify_id);
+
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (client->chrc->notify_io->data == client)
+ client->chrc->notify_io->data = NULL;
+#endif
free(client->owner);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ client->owner = NULL;
+#endif
free(client);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ client = NULL;
+#endif
}
static void notify_client_unref(void *data)