diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-17 18:01:25 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-04-20 08:21:28 +0200 |
commit | 8afeab4cdf5e7babdf86c2c86d527badada7da1d (patch) | |
tree | d80cc5e2d52801728cdfdee7a240b095e4c9fb87 /cmd | |
parent | bf92db1033d9ef20243f30751169e2e5b302c2ad (diff) | |
download | u-boot-8afeab4cdf5e7babdf86c2c86d527badada7da1d.zip u-boot-8afeab4cdf5e7babdf86c2c86d527badada7da1d.tar.gz u-boot-8afeab4cdf5e7babdf86c2c86d527badada7da1d.tar.bz2 |
cmd: eficonfig: check initrd path allocation
After allocating memory for the initrd file path we need to check the
initrd buffer pointer is not NULL.
Fixes: 87d791423ac6 ("eficonfig: menu-driven addition of UEFI boot option")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/eficonfig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 8234e60..0ba92c6 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -1419,7 +1419,7 @@ static efi_status_t eficonfig_edit_boot_option(u16 *varname, struct eficonfig_bo } bo->initrd_info.current_path = calloc(1, EFICONFIG_FILE_PATH_BUF_SIZE); - if (!bo->file_info.current_path) { + if (!bo->initrd_info.current_path) { ret = EFI_OUT_OF_RESOURCES; goto out; } |