Skip to content

Commit 5d18f93

Browse files
Thalleymbolivar-nordic
authored andcommitted
Bluetooth: Audio: Unicast client missing unref on ACL disconnected
The unicast client takes a reference to the ACL, but did not return the reference when the ACL disconnected, but rather just reset everything. Modified to detach the stream, ensuring a bt_conn_unref on ACL disconnect. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 6d98a1c commit 5d18f93

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

subsys/bluetooth/audio/stream.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,12 @@ void bt_audio_stream_reset(struct bt_audio_stream *stream)
264264

265265
BT_DBG("stream %p", stream);
266266

267-
if (stream == NULL || stream->conn == NULL) {
267+
if (stream == NULL) {
268268
return;
269269
}
270270

271+
bt_audio_stream_detach(stream);
272+
271273
err = bt_audio_cig_terminate(stream);
272274
if (err != 0) {
273275
BT_ERR("Failed to terminate CIG: %d", err);

0 commit comments

Comments
 (0)