Skip to content

Releases: sysprog21/lkmpg

latest

28 Aug 08:11
a8b652b
Compare
Choose a tag to compare
latest Pre-release
Pre-release
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]>