mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
efi_loader: SetVariable() fix illegal return
We always have to return via EFI_EXIT() from EFIAPI functions.
Coverity reported an unreachable line and a resource leak.
Fixes: commit 6d2f27c5fd
("efi_loader: variable: support APPEND_WRITE")
Reported-by: Coverity Scan CID 253575, CID 184095
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
be09372a71
commit
edb6b6842c
1 changed files with 1 additions and 1 deletions
|
@ -470,7 +470,7 @@ efi_status_t EFIAPI efi_set_variable(u16 *variable_name,
|
|||
|
||||
if (attributes & EFI_VARIABLE_APPEND_WRITE) {
|
||||
if (!prefix(old_val, "(blob)")) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
ret = EFI_DEVICE_ERROR;
|
||||
goto out;
|
||||
}
|
||||
old_size = strlen(old_val);
|
||||
|
|
Loading…
Reference in a new issue