All of
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <>
Subject: [PATCH 1/1] efi_loader: fix efi_load_image_from_path()
Date: Wed, 20 Jan 2021 23:43:36 +0100	[thread overview]
Message-ID: <> (raw)

Use the correct GUID when closing the file load protocol.
Remove an unnecessary check (Coverity CID 316363).

Signed-off-by: Heinrich Schuchardt <>
 lib/efi_loader/efi_boottime.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index b2cb0160c0..18ca96791c 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1990,10 +1990,7 @@ efi_status_t efi_load_image_from_path(bool boot_policy,
 	if (ret != EFI_SUCCESS)
 		efi_free_pages(addr, pages);
-	if (load_file_protocol)
-		EFI_CALL(efi_close_protocol(device,
-					    &efi_guid_load_file2_protocol,
-					    efi_root, NULL));
+	EFI_CALL(efi_close_protocol(device, guid, efi_root, NULL));
 	if (ret == EFI_SUCCESS) {
 		*buffer = (void *)(uintptr_t)addr;
 		*size = buffer_size;

                 reply	other threads:[~2021-01-20 22:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.