MdeModulePkg Pcd: Refine the code to avoid error report.
authorStar Zeng <star.zeng@intel.com>
Tue, 19 Nov 2013 05:42:51 +0000 (05:42 +0000)
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Nov 2013 05:42:51 +0000 (05:42 +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@14861 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/PCD/Dxe/Service.c

index 513402c..4bdb071 100644 (file)
@@ -501,6 +501,7 @@ BuildPcdDxeDataBase (
   ASSERT(mPcdDatabase.DxeDb != NULL);\r
   PcdDxeDbLen = mPcdDatabase.DxeDb->Length + mPcdDatabase.DxeDb->UninitDataBaseSize;\r
   PcdDxeDb = AllocateZeroPool (PcdDxeDbLen);\r
+  ASSERT (PcdDxeDb != NULL);\r
   CopyMem (PcdDxeDb, mPcdDatabase.DxeDb, mPcdDatabase.DxeDb->Length);\r
   FreePool (mPcdDatabase.DxeDb);\r
   mPcdDatabase.DxeDb = PcdDxeDb;\r