diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-22 10:41:00 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-05-01 07:38:29 +0200 |
commit | 566f067349a8f6136cf62d907019efdf1e250ce5 (patch) | |
tree | 7d5ab6ecdfed4757638c97aa46bbf1a3aea1a505 /lib/efi_loader/efi_variable.c | |
parent | 84aab11d3503a555ca6349da76efa4f4aedfc136 (diff) |
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: 53f6a5aa8626 ("efi_loader: Replace config option for initrd loading")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/efi_loader/efi_variable.c')
0 files changed, 0 insertions, 0 deletions