[PATCH] fs/squashfs: Ensure memory is freed by using unwind goto
Joao Marcos Costa
joaomarcos.costa at bootlin.com
Tue Oct 7 12:15:05 CEST 2025
Hello, Andrew
On 10/2/25 12:36, Andrew Goodbody wrote:
> Returning immediately from sqfs_read_nest is not consistent with other
> error checks in this function and can lead to memory leaks. Instead use
> the unwind goto used elsewhere to ensure that the memory is freed.
>
> This issue was found by Smatch.
>
> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
> ---
Thanks for this fix!
Reviewed-by: Joao Marcos Costa <joaomarcos.costa at bootlin.com>
--
Best regards,
João Marcos Costa
More information about the U-Boot
mailing list