diff options
Diffstat (limited to 'SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent')
-rw-r--r-- | SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c index b718e82e20..ec389c7e8b 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c +++ b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c @@ -522,6 +522,10 @@ InitializeDebugAgent ( // Build mailbox in HOB and setup Mailbox Set In Pei flag
//
Mailbox = AllocateZeroPool (sizeof (DEBUG_AGENT_MAILBOX));
+ if (Mailbox == NULL) {
+ DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to allocate memory!\n"));
+ CpuDeadLoop ();
+ }
MailboxLocation = (UINT64)(UINTN)Mailbox;
MailboxLocationPointer = BuildGuidDataHob (
&gEfiDebugAgentGuid,
|