summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_setup.c
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2025-07-02 11:01:36 +0100
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2025-07-03 11:32:49 +0300
commit9d95a35715fcb8e81ee423e31273489a47ed1563 (patch)
tree0712f1fcf7ad7315ae97f3ec8a142ce9dbe18826 /lib/efi_loader/efi_setup.c
parent4e103418bed6374b9aa43d067cee704d7e745dc9 (diff)
efi_loader: Prevent dereferencing NULL pointer
Taking the first goto error: in file_open could either result in an attempt to dereference fh when NULL or else free fh->path which has not been assigned to and so will be unknown. Avoid both of these problems by passing path to free instead of fh->path. This issue found by Smatch. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/efi_loader/efi_setup.c')
0 files changed, 0 insertions, 0 deletions