diff options
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c index 6de22d4a1c..771c7f95d9 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c @@ -101,14 +101,15 @@ FpdtStatusCodeListenerSmm ( // Try to allocate big SMRAM data to store Boot record.
//
if (mSmramIsOutOfResource) {
+ ReleaseSpinLock (&mSmmFpdtLock);
return EFI_OUT_OF_RESOURCES;
}
- NewRecordBuffer = AllocatePool (mBootRecordSize + Data->Size + EXTENSION_RECORD_SIZE);
+ NewRecordBuffer = ReallocatePool (mBootRecordSize, mBootRecordSize + Data->Size + EXTENSION_RECORD_SIZE, mBootRecordBuffer);
if (NewRecordBuffer == NULL) {
+ ReleaseSpinLock (&mSmmFpdtLock);
mSmramIsOutOfResource = TRUE;
return EFI_OUT_OF_RESOURCES;
}
- CopyMem (NewRecordBuffer, mBootRecordBuffer, mBootRecordSize);
mBootRecordBuffer = NewRecordBuffer;
mBootRecordMaxSize = mBootRecordSize + Data->Size + EXTENSION_RECORD_SIZE;
}
|