From 932b90f6c33e8f428bbfd1d761ff966e7d258c7f Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 13 Mar 2023 15:51:47 -0700 Subject: [PATCH] shared/bap: Fix not unregistering idle callback on detach 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 952b7be26..7a53fbc3e 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.47.3