Skip to content

latest

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 28 Aug 08:11
a8b652b
Fix incorrect gpio_free_array usage (#339)

The gpio_free_array function was incorrectly passed ARRAY_SIZE(leds)
when freeing the 'buttons' array in multiple examples:
- examples/intrp.c
- examples/bottomhalf.c
- examples/bh_halfthreaded.c

This mismatch could lead to invalid memory access if the size of
'buttons' differs from 'leds'.

Updated all occurrences to use ARRAY_SIZE(buttons) for correctness.

Co-authored-by: EricccTaiwan <[email protected]>
Signed-off-by: Jordan Chiu <[email protected]>