
18 Mar
2021
18 Mar
'21
12:52 p.m.
On 18.03.21 12:18, Heinrich Schuchardt wrote:
We must free all entries that we remove from the list not just one to avoid a memory leak.
With list_for_each_entry_safe_reverse() it is safe to delete the current entry as it provides a second pointer for the next entry.
I got that wrong:
dfu_alt_init() reserves memory for dfu_alt_num entries at once. So must call free() only once.
Sorry for the noise.
Best regards
Heinrich