samples: bluetooth: central_iso: unchecked buffer allocation #72699
Labels
area: Bluetooth ISO
Bluetooth LE Isochronous Channels
area: Bluetooth
area: Samples
Samples
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Describe the bug
In
central_iso
sample (functioniso_timer_timeout
), no check on buffer allocation failure is performed.See code snippet:
zephyr/samples/bluetooth/central_iso/src/main.c
Lines 62 to 68 in d9b3ffa
As a consequence, a system crash is observed when buffer allocation fails.
To Reproduce
Not so easy to reproduce and it depends on the buffer allocation policy.
Error observed while running a new platform against Nordic nRF52840 board.
Expected behavior
Sample should be robust against buffer allocation failure, e.g. throwing an error or a warning an retrying.
Impact
Annoyance, especially when validating new platform prone to have genuine bugs.
Logs and console output
Zephyr crash log.
Environment (please complete the following information):
Additional context
Actually, from quick check, having
K_FOREVER
as timeout should avoid to getNULL
as return value, but indeed this observed.The text was updated successfully, but these errors were encountered: