On Wed, 1 Jul 2026, Shihao Ren wrote:

> In the funcs allocation failure path, the cleanup loop iterates with
> 'j' but frees objs[i].funcs, which uses the outer loop index 'i'
> instead of the loop variable 'j'. As a result the just-failed (NULL)
> entry is freed repeatedly, while the funcs buffers already allocated
> for objs[0..i-1] are leaked.
> 
> Use objs[j].funcs so the previously allocated entries are correctly
> released.
> 
> Fixes: 59adee07b568 ("livepatch/klp-build: Add stub init code for livepatch 
> modules")
> Signed-off-by: Shihao Ren <[email protected]>

Acked-by: Miroslav Benes <[email protected]>

M

Reply via email to