Skip to content

Commit 3a098c9

Browse files
theob-profabiobaltieri
authored andcommitted
Bluetooth: Host: Unref ISO fragments after disconnection
When sending data using ISO and the data is fragmented, if the connection is cut before all the fragments are sent, the data buffer will be leaked. Fix the issue by unref'ing the buffer when ISO is not in a connected state. Signed-off-by: Théo Battrel <[email protected]>
1 parent 70696f5 commit 3a098c9

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

subsys/bluetooth/host/iso.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ static struct net_buf *iso_data_pull(struct bt_conn *conn,
779779
LOG_DBG("channel has been disconnected");
780780
__ASSERT_NO_MSG(b == frag);
781781

782+
net_buf_unref(b);
783+
782784
/* Service other connections */
783785
bt_tx_irq_raise();
784786

0 commit comments

Comments
 (0)