From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This make sure idle callback is unregistered before bt_gatt_client is unref. --- src/shared/bap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/bap.c b/src/shared/bap.c index 952b7be260ab..7a53fbc3e91c 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -3818,6 +3818,8 @@ void bt_bap_detach(struct bt_bap *bap) bap->req = NULL; } + bt_gatt_client_idle_unregister(bap->client, bap->idle_id); + /* Cancel queued requests */ queue_remove_all(bap->reqs, NULL, NULL, bap_req_detach); -- 2.39.2