Skip to content

Commit 1280f43

Browse files
Thalleykartben
authored andcommitted
Bluetooth: ASCS: Missing cleanup of stream for idle state
When the stream enters the idle state, some values were not properly reset (e.g. the stream->ep). Use the bt_bap_stream_detach function to clean up the stream. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
1 parent c858c8d commit 1280f43

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

subsys/bluetooth/audio/ascs.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,7 @@ static void ase_enter_state_idle(struct bt_ascs_ase *ase)
318318

319319
ase->ep.receiver_ready = false;
320320

321-
if (stream->conn != NULL) {
322-
bt_conn_unref(stream->conn);
323-
stream->conn = NULL;
324-
}
321+
bt_bap_stream_detach(stream);
325322

326323
ops = stream->ops;
327324
if (ops != NULL && ops->released != NULL) {

0 commit comments

Comments
 (0)