mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 15:26:03 +09: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
|
@ -901,7 +901,8 @@ static efi_status_t efi_capsule_delete_file(const u16 *filename)
|
||||||
/* ignore an error */
|
/* ignore an error */
|
||||||
EFI_CALL((*dirh->close)(dirh));
|
EFI_CALL((*dirh->close)(dirh));
|
||||||
|
|
||||||
ret = EFI_CALL((*fh->delete)(fh));
|
if (ret == EFI_SUCCESS)
|
||||||
|
ret = EFI_CALL((*fh->delete)(fh));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user