UINTN Count;\r
CONST CHAR16 *TempPointer;\r
UINTN CurrentValueSize;\r
+ CHAR16 *NewValue;\r
\r
CurrentItemPackage = NULL;\r
GetItemValue = 0;\r
// get the item VALUE for a previous flag\r
//\r
CurrentValueSize = ValueSize + StrSize(Argv[LoopCounter]) + sizeof(CHAR16);\r
- CurrentItemPackage->Value = ReallocatePool(ValueSize, CurrentValueSize, CurrentItemPackage->Value);\r
- ASSERT(CurrentItemPackage->Value != NULL);\r
+ NewValue = ReallocatePool(ValueSize, CurrentValueSize, CurrentItemPackage->Value);\r
+ if (NewValue == NULL) {\r
+ SHELL_FREE_NON_NULL (CurrentItemPackage->Value);\r
+ SHELL_FREE_NON_NULL (CurrentItemPackage);\r
+ ShellCommandLineFreeVarList (*CheckPackage);\r
+ *CheckPackage = NULL;\r
+ return EFI_OUT_OF_RESOURCES;\r
+ }\r
+ CurrentItemPackage->Value = NewValue;\r
if (ValueSize == 0) {\r
StrCpyS( CurrentItemPackage->Value, \r
CurrentValueSize/sizeof(CHAR16), \r
Prompt the user and return the resultant answer to the requestor.\r
\r
This function will display the requested question on the shell prompt and then\r
- wait for an apropriate answer to be input from the console.\r
+ wait for an appropriate answer to be input from the console.\r
\r
if the SHELL_PROMPT_REQUEST_TYPE is SHELL_PROMPT_REQUEST_TYPE_YESNO, ShellPromptResponseTypeQuitContinue\r
or SHELL_PROMPT_REQUEST_TYPE_YESNOCANCEL then *Response is of type SHELL_PROMPT_RESPONSE.\r