mirror of https://github.com/acidanthera/audk.git
OvmfPkg/XenPvBlkDxe: add return value if allocting fail
return EFI_OUT_OF_RESOURCES if pool allocating fail. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien@xen.org> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com> Message-Id: <1606183592-81879-2-git-send-email-xiewenyi2@huawei.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
73b604bb1e
commit
f69a2b9a42
|
@ -155,6 +155,10 @@ XenPvBlockFrontInitialization (
|
|||
ASSERT (NodeName != NULL);
|
||||
|
||||
Dev = AllocateZeroPool (sizeof (XEN_BLOCK_FRONT_DEVICE));
|
||||
if (Dev == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
Dev->Signature = XEN_BLOCK_FRONT_SIGNATURE;
|
||||
Dev->NodeName = NodeName;
|
||||
Dev->XenBusIo = XenBusIo;
|
||||
|
|
Loading…
Reference in New Issue