Skip to content

Commit 70696f5

Browse files
theob-profabiobaltieri
authored andcommitted
Bluetooth: Host: Free ISO TX context
When disconnected while sending data, if ISO doesn't get the number of completed packets it will not call `process_unack_tx` and thus will leak TX context. Fix that by setting the connection state in ISO disconnection which will trigger a call to `process_unack_tx`. Signed-off-by: Théo Battrel <[email protected]>
1 parent 2bdf2b7 commit 70696f5

File tree

1 file changed

+1
-0
lines changed
  • subsys/bluetooth/host

1 file changed

+1
-0
lines changed

subsys/bluetooth/host/iso.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ static void bt_iso_chan_disconnected(struct bt_iso_chan *chan, uint8_t reason)
431431
__ASSERT(chan->iso != NULL, "NULL conn for iso chan %p", chan);
432432

433433
bt_iso_chan_set_state(chan, BT_ISO_STATE_DISCONNECTED);
434+
bt_conn_set_state(chan->iso, BT_CONN_DISCONNECT_COMPLETE);
434435

435436
/* The peripheral does not have the concept of a CIG, so once a CIS
436437
* disconnects it is completely freed by unref'ing it

0 commit comments

Comments
 (0)