MdePkg PeiServicesLib: Refine the code to avoid error report.
authorStar Zeng <star.zeng@intel.com>
Mon, 14 Oct 2013 09:39:25 +0000 (09:39 +0000)
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 14 Oct 2013 09:39:25 +0000 (09:39 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14769 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/PeiServicesLib/PeiServicesLib.c

index e10dd88..3428add 100644 (file)
@@ -624,12 +624,14 @@ InternalPeiServicesInstallFvInfoPpi (
     // To install FvInfo Ppi.\r
     //\r
     FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI));\r
+    ASSERT (FvInfoPpi != NULL);\r
     PpiGuid = &gEfiPeiFirmwareVolumeInfoPpiGuid;\r
   } else {\r
     //\r
     // To install FvInfo2 Ppi.\r
     //\r
     FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI));\r
+    ASSERT (FvInfoPpi != NULL);\r
     ((EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *) FvInfoPpi)->AuthenticationStatus = AuthenticationStatus;\r
     PpiGuid = &gEfiPeiFirmwareVolumeInfo2PpiGuid;\r
   }\r