Apply code to avoid security warnings.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7279 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2009-01-15 03:00:00 +00:00
parent bcccf0b071
commit b364eeb012
2 changed files with 8 additions and 9 deletions

View File

@@ -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;