Add the missing check for NULL pointer before use it.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Mar 2010 07:56:48 +0000 (07:56 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Mar 2010 07:56:48 +0000 (07:56 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@10140 6f19259b-4bc3-4df7-8a09-765794883524

edk2/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c

index a258543..d425c36 100644 (file)
@@ -621,6 +621,7 @@ ParseOpCodes (
       // Create a new Form Map for this FormSet\r
       //\r
       CurrentForm = AllocateZeroPool (sizeof (FORM_BROWSER_FORM));\r
       // Create a new Form Map for this FormSet\r
       //\r
       CurrentForm = AllocateZeroPool (sizeof (FORM_BROWSER_FORM));\r
+      ASSERT (CurrentForm != NULL);\r
       CurrentForm->Signature = FORM_BROWSER_FORM_SIGNATURE;\r
 \r
       InitializeListHead (&CurrentForm->StatementListHead);\r
       CurrentForm->Signature = FORM_BROWSER_FORM_SIGNATURE;\r
 \r
       InitializeListHead (&CurrentForm->StatementListHead);\r