efi_loader: Prevent leak of memory from tmp_files
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 3 Oct 2025 14:54:34 +0000 (15:54 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 18 Oct 2025 09:41:31 +0000 (11:41 +0200)
commit11a64138f5f3525c2b02059e316701c4f55714cb
tree35c003e3ace9147ef50a3646c3b2801793620dcb
parentbd87ec920d266a31fe716717682bf0bf541fa1e6
efi_loader: Prevent leak of memory from tmp_files

After the malloc of tmp_files and before its value is recorded an early
exit will need to free tmp_files to prevent leaking that memory.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_capsule.c