diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-17 22:00:13 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-20 22:26:19 +0000 |
commit | fa390810e1fc6b80f936f57c4bed4a7056f18296 (patch) | |
tree | 6bc7f24bb8f80e76d080722cbaec9719decb9faf /lib | |
parent | c974ab0ecb1c47678219395d053d385b7f5b61f0 (diff) | |
download | u-boot-fa390810e1fc6b80f936f57c4bed4a7056f18296.zip u-boot-fa390810e1fc6b80f936f57c4bed4a7056f18296.tar.gz u-boot-fa390810e1fc6b80f936f57c4bed4a7056f18296.tar.bz2 |
efi_loader: Delete() return EFI_WARN_DELETE_FAILURE
If EFI_FILE_PROTOCOL.Delete() fails, always close the handle and return
EFI_WARN_DELETE_FAILURE.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_file.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index 182d735..36ca719 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -307,16 +307,10 @@ static efi_status_t EFIAPI efi_file_delete(struct efi_file_handle *file) EFI_ENTRY("%p", file); - if (set_blk_dev(fh)) { - ret = EFI_DEVICE_ERROR; - goto error; - } + if (set_blk_dev(fh) || fs_unlink(fh->path)) + ret = EFI_WARN_DELETE_FAILURE; - if (fs_unlink(fh->path)) - ret = EFI_DEVICE_ERROR; file_close(fh); - -error: return EFI_EXIT(ret); } |