Bluetooth: samples: central_iso: Unref if send fails
Fixes a resource leak. Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit is contained in:
parent
57ab4f4cf4
commit
58cc10b333
1 changed files with 1 additions and 0 deletions
|
@ -67,6 +67,7 @@ static void iso_timer_timeout(struct k_work *work)
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printk("Failed to send ISO data (%d)\n", ret);
|
printk("Failed to send ISO data (%d)\n", ret);
|
||||||
|
net_buf_unref(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
k_work_schedule(&iso_send_work, K_USEC(interval_us));
|
k_work_schedule(&iso_send_work, K_USEC(interval_us));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue