mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
bootmeth_efi: Check the filename-allocation in the network path
If the filename cannot be set we should give up. Add the missing error check. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
aa0ba7fbda
commit
ea7f88f313
1 changed files with 2 additions and 0 deletions
|
@ -252,6 +252,8 @@ static int distro_efi_read_bootflow_net(struct bootflow *bflow)
|
|||
if (!bootfile_name)
|
||||
return log_msg_ret("bootfile_name", ret);
|
||||
bflow->fname = strdup(bootfile_name);
|
||||
if (!bflow->fname)
|
||||
return log_msg_ret("fi0", -ENOMEM);
|
||||
|
||||
/* do the hideous EFI hack */
|
||||
efi_set_bootdev("Net", "", bflow->fname, map_sysmem(addr, 0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue