aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt2019-09-23 22:18:09 +0200
committerHeinrich Schuchardt2019-09-23 22:53:25 +0200
commitedb6b6842cbddc012d64491701f1d0979ffa96b3 (patch)
treea74a01735f4a354e84a9463489d442b6484af3cb
parentbe09372a71ceeabf6762e84c33e9be96bafeb272 (diff)
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 6d2f27c5fd60 ("efi_loader: variable: support APPEND_WRITE") Reported-by: Coverity Scan CID 253575, CID 184095 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--lib/efi_loader/efi_variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index 48ee255f879..22ad271bd85 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -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);