coccinelle: free: add a checker for `__cleanup(kfree)` usage

Using __cleanup(kfree) will pass the stack address of the annotated
local variable to kfree functions. This will lead to invalid
deallocation issues. Inspired by CVE-2026-45959 and similar bugs
recently detected.

Signed-off-by: Ella Ma <alansnape3058@gmail.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
1 file changed