mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
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:
parent
bcccf0b071
commit
b364eeb012
@ -399,19 +399,17 @@ CoreCreateEventEx (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allcoate and initialize a new event structure.
|
// Allocate and initialize a new event structure.
|
||||||
//
|
//
|
||||||
Status = CoreAllocatePool (
|
if ((Type & EVT_RUNTIME) != 0) {
|
||||||
((Type & EVT_RUNTIME) != 0) ? EfiRuntimeServicesData: EfiBootServicesData,
|
IEvent = AllocateRuntimeZeroPool (sizeof (IEVENT));
|
||||||
sizeof (IEVENT),
|
} else {
|
||||||
(VOID **)&IEvent
|
IEvent = AllocateZeroPool (sizeof (IEVENT));
|
||||||
);
|
}
|
||||||
if (EFI_ERROR (Status)) {
|
if (IEvent == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZeroMem (IEvent, sizeof (IEVENT));
|
|
||||||
|
|
||||||
IEvent->Signature = EVENT_SIGNATURE;
|
IEvent->Signature = EVENT_SIGNATURE;
|
||||||
IEvent->Type = Type;
|
IEvent->Type = Type;
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ CoreInitializeDebugImageInfoTable (
|
|||||||
// See comments in the CoreUpdateDebugTableCrc32() function below for details.
|
// See comments in the CoreUpdateDebugTableCrc32() function below for details.
|
||||||
//
|
//
|
||||||
mDebugTable = AllocateAlignedPages (EFI_SIZE_TO_PAGES (sizeof (EFI_SYSTEM_TABLE_POINTER)), FOUR_MEG_ALIGNMENT);
|
mDebugTable = AllocateAlignedPages (EFI_SIZE_TO_PAGES (sizeof (EFI_SYSTEM_TABLE_POINTER)), FOUR_MEG_ALIGNMENT);
|
||||||
|
ASSERT (mDebugTable != NULL);
|
||||||
mDebugTable->Signature = EFI_SYSTEM_TABLE_SIGNATURE;
|
mDebugTable->Signature = EFI_SYSTEM_TABLE_SIGNATURE;
|
||||||
mDebugTable->EfiSystemTableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) gDxeCoreST;
|
mDebugTable->EfiSystemTableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) gDxeCoreST;
|
||||||
mDebugTable->Crc32 = 0;
|
mDebugTable->Crc32 = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user