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

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