diff options
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Event/Event.c')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Event/Event.c | 16 |
1 files changed, 7 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;
|