diff options
| author | Peter Jones <pjones@redhat.com> | 2020-07-22 23:55:44 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2020-07-23 20:53:24 -0400 |
| commit | c186bdddaa7b103aef9d4a164ac0a07499dba112 (patch) | |
| tree | 1a3c6c063d93349c01e17650b73a1c7b3ee819e0 | |
| parent | 6df96cdb20b84b33027d2e40bc0dbe0676d31282 (diff) | |
| download | efi-boot-shim-c186bdddaa7b103aef9d4a164ac0a07499dba112.tar.gz efi-boot-shim-c186bdddaa7b103aef9d4a164ac0a07499dba112.zip | |
simple_file: fix uninitialized variable/unchecked return
Signed-off-by: Peter Jones <pjones@redhat.com>
Upstream: pr#212
| -rw-r--r-- | lib/simple_file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/simple_file.c b/lib/simple_file.c index 3bf92ed8..6ad31b4d 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; |
