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:
Rubin Gerritsen 2023-06-07 13:06:43 +02:00 committed by Anas Nashif
commit 58cc10b333

View file

@ -67,6 +67,7 @@ static void iso_timer_timeout(struct k_work *work)
if (ret < 0) {
printk("Failed to send ISO data (%d)\n", ret);
net_buf_unref(buf);
}
k_work_schedule(&iso_send_work, K_USEC(interval_us));