projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c61e0c
)
efi_loader: memory leak in efi_set_variable()
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Tue, 2 Oct 2018 03:30:05 +0000
(
05:30
+0200)
committer
Alexander Graf
<agraf@suse.de>
Tue, 16 Oct 2018 14:40:11 +0000
(16:40 +0200)
Do not leak native_name if out of memory.
This addresses CoverityScan CID 184095.
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_variable.c
patch
|
blob
|
history
diff --git
a/lib/efi_loader/efi_variable.c
b/lib/efi_loader/efi_variable.c
index a1313fa2158cff1d376c7d84bc6d82796222233d..19d9cb865f25ba35938ec42c08bdb9b571d63c27 100644
(file)
--- a/
lib/efi_loader/efi_variable.c
+++ b/
lib/efi_loader/efi_variable.c
@@
-294,8
+294,10
@@
efi_status_t EFIAPI efi_set_variable(u16 *variable_name, efi_guid_t *vendor,
}
val = malloc(2 * data_size + strlen("{ro,run,boot}(blob)") + 1);
- if (!val)
- return EFI_EXIT(EFI_OUT_OF_RESOURCES);
+ if (!val) {
+ ret = EFI_OUT_OF_RESOURCES;
+ goto out;
+ }
s = val;