mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
efi_loader: efi_capsule_delete_file() NULL dereference
If opening a file fails, the file handle pointer is not valid and must not be dereferenced. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
3dca77b1dc
commit
e27b0ff1b7
1 changed files with 2 additions and 1 deletions
|
@ -901,7 +901,8 @@ static efi_status_t efi_capsule_delete_file(const u16 *filename)
|
|||
/* ignore an error */
|
||||
EFI_CALL((*dirh->close)(dirh));
|
||||
|
||||
ret = EFI_CALL((*fh->delete)(fh));
|
||||
if (ret == EFI_SUCCESS)
|
||||
ret = EFI_CALL((*fh->delete)(fh));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue