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

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