mirror of https://github.com/acidanthera/audk.git
ShellPkg/UefiShellLib.c: Handle memory allocation failure
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
parent
18bff310aa
commit
eeb9744e56
|
@ -2976,13 +2976,14 @@ ShellPrintHiiEx(
|
|||
CHAR16 *HiiFormatString;
|
||||
EFI_STATUS RetVal;
|
||||
|
||||
RetVal = EFI_DEVICE_ERROR;
|
||||
|
||||
VA_START (Marker, HiiFormatHandle);
|
||||
HiiFormatString = HiiGetString(HiiFormatHandle, HiiFormatStringId, Language);
|
||||
ASSERT(HiiFormatString != NULL);
|
||||
|
||||
RetVal = InternalShellPrintWorker(Col, Row, HiiFormatString, Marker);
|
||||
|
||||
SHELL_FREE_NON_NULL(HiiFormatString);
|
||||
if (HiiFormatString != NULL) {
|
||||
RetVal = InternalShellPrintWorker (Col, Row, HiiFormatString, Marker);
|
||||
SHELL_FREE_NON_NULL (HiiFormatString);
|
||||
}
|
||||
VA_END(Marker);
|
||||
|
||||
return (RetVal);
|
||||
|
|
Loading…
Reference in New Issue