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

Reported-by: Coverity (CID 185829)
Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---
v2
        change commit message to show Reported-by: Coverity
---
 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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to