X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FUefiPxeBcDxe%2FPxeBcDhcp6.c;h=327b4cf1cfc5fc0f3e1ef388d51e05e188871756;hb=9f4f29cbeec4b7eaa822e5377a749d0721853e36;hp=f2239fd8c005dfdd5b7f6dbb9b6ace41ade21e67;hpb=6a4eed9bad1c4fc08df5cf36eed0998417db43c3;p=mirror_edk2.git
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
index f2239fd8c0..327b4cf1cf 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
@@ -2,7 +2,7 @@
Functions implementation related with DHCPv6 for UefiPxeBc Driver.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.
- Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -2030,6 +2030,9 @@ PxeBcDhcp6CallBack (
SelectAd = &Private->OfferBuffer[Private->SelectIndex - 1].Dhcp6.Packet.Offer;
*NewPacket = AllocateZeroPool (SelectAd->Size);
ASSERT (*NewPacket != NULL);
+ if (*NewPacket == NULL) {
+ return EFI_ABORTED;
+ }
CopyMem (*NewPacket, SelectAd, SelectAd->Size);
}
break;