From: Star Zeng Date: Mon, 14 Oct 2013 09:39:25 +0000 (+0000) Subject: MdePkg PeiServicesLib: Refine the code to avoid error report. X-Git-Tag: edk2-stable201903~12185 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=ed84519ce846cda4bc175d8d18ee03937090176d MdePkg PeiServicesLib: Refine the code to avoid error report. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14769 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c index e10dd8800f..3428addcc6 100644 --- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c +++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c @@ -624,12 +624,14 @@ InternalPeiServicesInstallFvInfoPpi ( // To install FvInfo Ppi. // FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI)); + ASSERT (FvInfoPpi != NULL); PpiGuid = &gEfiPeiFirmwareVolumeInfoPpiGuid; } else { // // To install FvInfo2 Ppi. // FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI)); + ASSERT (FvInfoPpi != NULL); ((EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *) FvInfoPpi)->AuthenticationStatus = AuthenticationStatus; PpiGuid = &gEfiPeiFirmwareVolumeInfo2PpiGuid; }