diff options
-rw-r--r-- | MdeModulePkg/Core/Dxe/Event/Event.c | 16 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c | 1 |
2 files changed, 8 insertions, 9 deletions
diff --git a/MdeModulePkg/Core/Dxe/Event/Event.c b/MdeModulePkg/Core/Dxe/Event/Event.c index b2a3459324..09d5113361 100644 --- a/MdeModulePkg/Core/Dxe/Event/Event.c +++ b/MdeModulePkg/Core/Dxe/Event/Event.c @@ -399,19 +399,17 @@ CoreCreateEventEx ( }
//
- // Allcoate and initialize a new event structure.
+ // Allocate and initialize a new event structure.
//
- Status = CoreAllocatePool (
- ((Type & EVT_RUNTIME) != 0) ? EfiRuntimeServicesData: EfiBootServicesData,
- sizeof (IEVENT),
- (VOID **)&IEvent
- );
- if (EFI_ERROR (Status)) {
+ if ((Type & EVT_RUNTIME) != 0) {
+ IEvent = AllocateRuntimeZeroPool (sizeof (IEVENT));
+ } else {
+ IEvent = AllocateZeroPool (sizeof (IEVENT));
+ }
+ if (IEvent == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- ZeroMem (IEvent, sizeof (IEVENT));
-
IEvent->Signature = EVENT_SIGNATURE;
IEvent->Type = Type;
diff --git a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c index aa93e3168f..6d5f5c0f89 100644 --- a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c +++ b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c @@ -48,6 +48,7 @@ CoreInitializeDebugImageInfoTable ( // See comments in the CoreUpdateDebugTableCrc32() function below for details.
//
mDebugTable = AllocateAlignedPages (EFI_SIZE_TO_PAGES (sizeof (EFI_SYSTEM_TABLE_POINTER)), FOUR_MEG_ALIGNMENT);
+ ASSERT (mDebugTable != NULL);
mDebugTable->Signature = EFI_SYSTEM_TABLE_SIGNATURE;
mDebugTable->EfiSystemTableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) gDxeCoreST;
mDebugTable->Crc32 = 0;
|