mirror of https://github.com/acidanthera/audk.git
check that memory allocation was successful.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11568 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f20076daaf
commit
f8d3e6898a
|
@ -2606,6 +2606,12 @@ InternalShellPrintWorker(
|
|||
mPostReplaceFormat = AllocateZeroPool (PcdGet16 (PcdShellPrintBufferSize));
|
||||
mPostReplaceFormat2 = AllocateZeroPool (PcdGet16 (PcdShellPrintBufferSize));
|
||||
|
||||
if (mPostReplaceFormat == NULL || mPostReplaceFormat2 == NULL) {
|
||||
SHELL_FREE_NON_NULL(mPostReplaceFormat);
|
||||
SHELL_FREE_NON_NULL(mPostReplaceFormat2);
|
||||
return (EFI_OUT_OF_RESOURCES);
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
OriginalAttribute = gST->ConOut->Mode->Attribute;
|
||||
|
||||
|
|
Loading…
Reference in New Issue