Blame SOURCES/0054-simple_file-fix-uninitialized-variable-unchecked-ret.patch

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