aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeinrich Schuchardt2020-08-11 18:20:50 +0200
committerHeinrich Schuchardt2020-08-13 22:37:36 +0200
commitbc78d22d0f0db58b8a340ebf7d36ea2a217bfeac (patch)
treeba3ee9f49fbba4fe0ffb9ae421ec402cb06e0fa5 /cmd
parentcdcf591d9b20534e5f5c58aa2a2b07b3b173f5a1 (diff)
cmd/efidebug: missing initialization of load_options
Variable load_options must be initialized to NULL to avoid a segmentation fault when freeing the memory this variable points to. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/efidebug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index d00d4247dc8..9874838b005 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -1126,7 +1126,7 @@ static int do_efi_test_bootmgr(struct cmd_tbl *cmdtp, int flag,
efi_uintn_t exit_data_size = 0;
u16 *exit_data = NULL;
efi_status_t ret;
- void *load_options;
+ void *load_options = NULL;
ret = efi_bootmgr_load(&image, &load_options);
printf("efi_bootmgr_load() returned: %ld\n", ret & ~EFI_ERROR_MASK);