[U-Boot] [PATCH 1/1] efi_loader: memory leak in efi_dump_single_var()

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Mar 19 17:50:37 UTC 2019


A misplaced return statement lead to a memory leak in
efi_dump_single_var().

Fixes Coverity CID 185829

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 cmd/nvedit_efi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c
index ca32566a615..e65b38dbf39 100644
--- a/cmd/nvedit_efi.c
+++ b/cmd/nvedit_efi.c
@@ -80,7 +80,6 @@ static void efi_dump_single_var(u16 *name, efi_guid_t *guid)
 	printf(", DataSize = 0x%zx\n", size);
 	print_hex_dump("    ", DUMP_PREFIX_OFFSET, 16, 1, data, size, true);

-	return;
 out:
 	free(data);
 }
--
2.20.1



More information about the U-Boot mailing list