mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
efi_loader: out of memory in efi_add_memory_map_pg
Handle out of memory situation in efi_add_memory_map_pg().
Fixes: 5d00995c36
("efi_loader: Implement memory allocation and map")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
b52a277f9b
commit
ba27563093
1 changed files with 2 additions and 0 deletions
|
@ -282,6 +282,8 @@ static efi_status_t efi_add_memory_map_pg(u64 start, u64 pages,
|
|||
|
||||
++efi_memory_map_key;
|
||||
newlist = calloc(1, sizeof(*newlist));
|
||||
if (!newlist)
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
newlist->desc.type = memory_type;
|
||||
newlist->desc.physical_start = start;
|
||||
newlist->desc.virtual_start = start;
|
||||
|
|
Loading…
Reference in a new issue