mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-14 05:09:40 +00:00
MokManager: fix a wrong allocation failure check.
Signed-off-by: Peter Jones <pjones@redhat.com> Upstream: pr#212
This commit is contained in:
parent
d3b7dc54cd
commit
6df96cdb20
@ -1085,9 +1085,11 @@ static EFI_STATUS write_back_mok_list(MokListNode * list, INTN key_num,
|
|||||||
DataSize += sizeof(EFI_GUID);
|
DataSize += sizeof(EFI_GUID);
|
||||||
DataSize += list[i].MokSize;
|
DataSize += list[i].MokSize;
|
||||||
}
|
}
|
||||||
|
if (DataSize == 0)
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
Data = AllocatePool(DataSize);
|
Data = AllocatePool(DataSize);
|
||||||
if (Data == NULL && DataSize != 0)
|
if (Data == NULL)
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
|
||||||
ptr = Data;
|
ptr = Data;
|
||||||
|
Loading…
Reference in New Issue
Block a user