From c186bdddaa7b103aef9d4a164ac0a07499dba112 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 22 Jul 2020 23:55:44 -0400
Subject: [PATCH 54/62] simple_file: fix uninitialized variable/unchecked
return
Signed-off-by: Peter Jones <pjones@redhat.com>
Upstream: pr#212
---
lib/simple_file.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/simple_file.c b/lib/simple_file.c
index 3bf92ed8e0f..6ad31b4dc04 100644
--- a/lib/simple_file.c
+++ b/lib/simple_file.c
@@ -403,10 +403,10 @@ simple_file_selector(EFI_HANDLE * im, CHAR16 ** title, CHAR16 * name,
filter = L"";
if (!*im) {
EFI_HANDLE h;
- CHAR16 *volname;
+ CHAR16 *volname = NULL;
- simple_volume_selector(title, &volname, &h);
- if (!volname)
+ efi_status = simple_volume_selector(title, &volname, &h);
+ if (EFI_ERROR(efi_status) || !volname)
return;
FreePool(volname);
*im = h;
--
2.26.2