Skip to content
Commit 566f0673 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt
Browse files

efi_loader: improve error handling in try_load_entry()



The image is not unloaded if a security violation occurs.

If efi_set_load_options() fails, we do not free the memory allocated for
the optional data. We do not unload the image.

* Unload the image if a security violation occurs.
* Free load_options if efi_set_load_options() fails.
* Unload the image if efi_set_load_options() fails.

Fixes: 53f6a5aa ("efi_loader: Replace config option for initrd loading")
Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent 84aab11d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment