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 <theo.battrel@nordicsemi.no>
This commit is contained in:
parent
70696f5b0f
commit
3a098c9f61
1 changed files with 2 additions and 0 deletions
|
@ -779,6 +779,8 @@ static struct net_buf *iso_data_pull(struct bt_conn *conn,
|
||||||
LOG_DBG("channel has been disconnected");
|
LOG_DBG("channel has been disconnected");
|
||||||
__ASSERT_NO_MSG(b == frag);
|
__ASSERT_NO_MSG(b == frag);
|
||||||
|
|
||||||
|
net_buf_unref(b);
|
||||||
|
|
||||||
/* Service other connections */
|
/* Service other connections */
|
||||||
bt_tx_irq_raise();
|
bt_tx_irq_raise();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue