From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This make sure idle callback is unregistered before bt_gatt_client is unref. --- src/shared/csip.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.2