diff options
author | jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-19 07:58:58 +0000 |
---|---|---|
committer | jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-19 07:58:58 +0000 |
commit | 1ac628eee06a798bbf767e568bdc591b7d8c6fe8 (patch) | |
tree | 267062fff66cedadaa09b94754137cb3cadaab51 /MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c | |
parent | 8ca67c468bd7abb9acb58804006be3ce2a092a89 (diff) | |
download | edk2-platforms-1ac628eee06a798bbf767e568bdc591b7d8c6fe8.tar.xz |
Assertions added
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7305 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c index a01b4abe12..35ed197a96 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c @@ -279,6 +279,7 @@ CreateExpression ( FORM_EXPRESSION *Expression;
Expression = AllocateZeroPool (sizeof (FORM_EXPRESSION));
+ ASSERT (Expression != NULL);
Expression->Signature = FORM_EXPRESSION_SIGNATURE;
InitializeListHead (&Expression->OpCodeListHead);
@@ -302,6 +303,7 @@ CreateStorage ( FORMSET_STORAGE *Storage;
Storage = AllocateZeroPool (sizeof (FORMSET_STORAGE));
+ ASSERT (Storage != NULL);
Storage->Signature = FORMSET_STORAGE_SIGNATURE;
InitializeListHead (&Storage->NameValueListHead);
InsertTailList (&FormSet->StorageListHead, &Storage->Link);
@@ -433,6 +435,7 @@ InitializeRequestElement ( //
StringSize = (Storage->ConfigRequest != NULL) ? StrSize (Storage->ConfigRequest) : sizeof (CHAR16);
NewStr = AllocateZeroPool (StringSize + CONFIG_REQUEST_STRING_INCREMENTAL * sizeof (CHAR16));
+ ASSERT (NewStr != NULL);
if (Storage->ConfigRequest != NULL) {
CopyMem (NewStr, Storage->ConfigRequest, StringSize);
FreePool (Storage->ConfigRequest);
@@ -1094,6 +1097,7 @@ ParseOpCodes ( // Create a new Form for this FormSet
//
CurrentForm = AllocateZeroPool (sizeof (FORM_BROWSER_FORM));
+ ASSERT (CurrentForm != NULL);
CurrentForm->Signature = FORM_BROWSER_FORM_SIGNATURE;
InitializeListHead (&CurrentForm->ExpressionListHead);
InitializeListHead (&CurrentForm->StatementListHead);
@@ -1170,6 +1174,7 @@ ParseOpCodes ( //
case EFI_IFR_DEFAULTSTORE_OP:
DefaultStore = AllocateZeroPool (sizeof (FORMSET_DEFAULTSTORE));
+ ASSERT (DefaultStore != NULL);
DefaultStore->Signature = FORMSET_DEFAULTSTORE_SIGNATURE;
CopyMem (&DefaultStore->DefaultId, &((EFI_IFR_DEFAULTSTORE *) OpCodeData)->DefaultId, sizeof (UINT16));
@@ -1406,6 +1411,7 @@ ParseOpCodes ( // A Question may have more than one Default value which have different default types.
//
CurrentDefault = AllocateZeroPool (sizeof (QUESTION_DEFAULT));
+ ASSERT (CurrentDefault != NULL);
CurrentDefault->Signature = QUESTION_DEFAULT_SIGNATURE;
CurrentDefault->Value.Type = ((EFI_IFR_DEFAULT *) OpCodeData)->Type;
@@ -1432,6 +1438,7 @@ ParseOpCodes ( // It create a selection for use in current Question.
//
CurrentOption = AllocateZeroPool (sizeof (QUESTION_OPTION));
+ ASSERT (CurrentOption != NULL);
CurrentOption->Signature = QUESTION_OPTION_SIGNATURE;
CurrentOption->Flags = ((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Flags;
@@ -1505,6 +1512,7 @@ ParseOpCodes ( // evaluated at initialization and it will not be queued
//
CurrentExpression = AllocateZeroPool (sizeof (FORM_EXPRESSION));
+ ASSERT (CurrentExpression != NULL);
CurrentExpression->Signature = FORM_EXPRESSION_SIGNATURE;
CurrentExpression->Type = EFI_HII_EXPRESSION_DISABLE_IF;
InitializeListHead (&CurrentExpression->OpCodeListHead);
|