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:
Heinrich Schuchardt 2019-09-23 22:18:09 +02:00
parent be09372a71
commit edb6b6842c

View File

@ -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);