summaryrefslogtreecommitdiffstats
path: root/src/image
diff options
context:
space:
mode:
authorMichael Brown2025-03-23 20:11:13 +0100
committerMichael Brown2025-03-24 14:19:26 +0100
commitbac318743905e55ce424104cafbc8418e0672a80 (patch)
tree43707838ec1b471314ff426f50b434ff2cca031c /src/image
parent[efi] Use efi_open_unsafe() for all explicitly unsafe protocol opens (diff)
downloadipxe-bac318743905e55ce424104cafbc8418e0672a80.tar.gz
ipxe-bac318743905e55ce424104cafbc8418e0672a80.tar.xz
ipxe-bac318743905e55ce424104cafbc8418e0672a80.zip
[efi] Use efi_open() for all ephemeral protocol opens
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/efi_image.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/image/efi_image.c b/src/image/efi_image.c
index d2171e7de..ae9255ce5 100644
--- a/src/image/efi_image.c
+++ b/src/image/efi_image.c
@@ -234,12 +234,9 @@ static int efi_image_exec ( struct image *image ) {
}
/* Get the loaded image protocol for the newly loaded image */
- efirc = bs->OpenProtocol ( handle, &efi_loaded_image_protocol_guid,
- &loaded.interface, efi_image_handle,
- NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL );
- if ( efirc ) {
+ if ( ( rc = efi_open ( handle, &efi_loaded_image_protocol_guid,
+ &loaded.interface ) ) != 0 ) {
/* Should never happen */
- rc = -EEFI ( efirc );
goto err_open_protocol;
}