Heinrich Schuchardt 566f067349 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>
2024-05-01 07:38:29 +02:00
..
2024-04-17 17:05:57 -06:00
2022-12-31 13:35:19 -05:00
2024-03-01 18:34:08 -05:00
2020-10-14 11:16:34 -04:00
2022-10-31 11:04:00 -04:00
2022-05-02 09:58:13 -04:00
2022-03-02 10:28:12 -05:00