SourceLevelDebugPkg: Avoid NULL pointer reference.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17183 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -525,7 +525,7 @@ InitializeDebugAgent (
|
|||||||
if (Mailbox == NULL) {
|
if (Mailbox == NULL) {
|
||||||
DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to allocate memory!\n"));
|
DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to allocate memory!\n"));
|
||||||
CpuDeadLoop ();
|
CpuDeadLoop ();
|
||||||
}
|
} else {
|
||||||
MailboxLocation = (UINT64)(UINTN)Mailbox;
|
MailboxLocation = (UINT64)(UINTN)Mailbox;
|
||||||
MailboxLocationPointer = BuildGuidDataHob (
|
MailboxLocationPointer = BuildGuidDataHob (
|
||||||
&gEfiDebugAgentGuid,
|
&gEfiDebugAgentGuid,
|
||||||
@ -541,6 +541,7 @@ InitializeDebugAgent (
|
|||||||
// Update IDT entry to save the location pointer saved mailbox pointer
|
// Update IDT entry to save the location pointer saved mailbox pointer
|
||||||
//
|
//
|
||||||
SetLocationSavedMailboxPointerInIdtEntry (MailboxLocationPointer);
|
SetLocationSavedMailboxPointerInIdtEntry (MailboxLocationPointer);
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Save init arch type when debug agent initialized
|
// Save init arch type when debug agent initialized
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user