diff mbox series

[BlueZ,2/4] shared/csip: Fix not unregistering idle callback on detach

Message ID 20230313225150.267896-2-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,1/4] shared/bap: Fix not unregistering idle callback on detach | expand

Commit Message

Luiz Augusto von Dentz March 13, 2023, 10:51 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This make sure idle callback is unregistered before bt_gatt_client is
unref.
---
 src/shared/csip.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/src/shared/csip.c b/src/shared/csip.c
index ff2047a4ade0..094f448a3532 100644
--- a/src/shared/csip.c
+++ b/src/shared/csip.c
@@ -122,6 +122,8 @@  void bt_csip_detach(struct bt_csip *csip)
 	if (!queue_remove(sessions, csip))
 		return;
 
+	bt_gatt_client_idle_unregister(csip->client, csip->idle_id);
+
 	bt_gatt_client_unref(csip->client);
 	csip->client = NULL;