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;
|
CHAR16 *HiiFormatString;
|
||||||
EFI_STATUS RetVal;
|
EFI_STATUS RetVal;
|
||||||
|
|
||||||
|
RetVal = EFI_DEVICE_ERROR;
|
||||||
|
|
||||||
VA_START (Marker, HiiFormatHandle);
|
VA_START (Marker, HiiFormatHandle);
|
||||||
HiiFormatString = HiiGetString(HiiFormatHandle, HiiFormatStringId, Language);
|
HiiFormatString = HiiGetString(HiiFormatHandle, HiiFormatStringId, Language);
|
||||||
ASSERT(HiiFormatString != NULL);
|
if (HiiFormatString != NULL) {
|
||||||
|
|
||||||
RetVal = InternalShellPrintWorker (Col, Row, HiiFormatString, Marker);
|
RetVal = InternalShellPrintWorker (Col, Row, HiiFormatString, Marker);
|
||||||
|
|
||||||
SHELL_FREE_NON_NULL (HiiFormatString);
|
SHELL_FREE_NON_NULL (HiiFormatString);
|
||||||
|
}
|
||||||
VA_END(Marker);
|
VA_END(Marker);
|
||||||
|
|
||||||
return (RetVal);
|
return (RetVal);
|
||||||
|
|
Loading…
Reference in New Issue