aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Rini2024-03-25 22:15:47 -0400
committerTom Rini2024-03-25 22:15:47 -0400
commitab8d9ca3044acf51d8ff3bf3c4718c48f30ad606 (patch)
tree35c2e2eae8ed2cf1dda331b19dd806a33aaad913 /lib
parent8ef8dcc54a0d507912ee57e15a541c5cebcfca76 (diff)
parentdde373bde392c38649c8c4420e0c98ef8d38d9dc (diff)
Merge tag 'v2024.04-rc5' into next
Prepare v2024.04-rc5
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_bootbin.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_bootbin.c b/lib/efi_loader/efi_bootbin.c
index 733cc1a61b5..b7910f78fb6 100644
--- a/lib/efi_loader/efi_bootbin.c
+++ b/lib/efi_loader/efi_bootbin.c
@@ -125,7 +125,7 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size)
efi_handle_t mem_handle = NULL, handle;
struct efi_device_path *file_path = NULL;
struct efi_device_path *msg_path;
- efi_status_t ret, ret2;
+ efi_status_t ret;
u16 *load_options;
if (!bootefi_device_path || !bootefi_image_path) {
@@ -172,11 +172,17 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size)
ret = do_bootefi_exec(handle, load_options);
out:
- ret2 = efi_uninstall_multiple_protocol_interfaces(mem_handle,
- &efi_guid_device_path,
- file_path, NULL);
+ if (mem_handle) {
+ efi_status_t r;
+
+ r = efi_uninstall_multiple_protocol_interfaces(
+ mem_handle, &efi_guid_device_path, file_path, NULL);
+ if (r != EFI_SUCCESS)
+ log_err("Uninstalling protocol interfaces failed\n");
+ }
efi_free_pool(file_path);
- return (ret != EFI_SUCCESS) ? ret : ret2;
+
+ return ret;
}
/**