Fix AHCI memory de-allocation issue
This patch fixed the pointer check before de-allocating memory previously allocated for AHCI controller. Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This commit is contained in:
parent
ecc370113d
commit
d23d7e07f8
|
@ -297,14 +297,14 @@ AhciDeinitialize (
|
|||
);
|
||||
}
|
||||
|
||||
if (AhciRegisters->AhciCommandTable != NULL) {
|
||||
if (AhciRegisters->AhciCmdList != NULL) {
|
||||
FreePages (
|
||||
AhciRegisters->AhciCmdList,
|
||||
EFI_SIZE_TO_PAGES ((UINTN) AhciRegisters->MaxCommandListSize)
|
||||
);
|
||||
}
|
||||
|
||||
if (AhciRegisters->AhciCommandTable != NULL) {
|
||||
if (AhciRegisters->AhciRFis != NULL) {
|
||||
FreePages (
|
||||
AhciRegisters->AhciRFis,
|
||||
EFI_SIZE_TO_PAGES ((UINTN) AhciRegisters->MaxReceiveFisSize)
|
||||
|
|
Loading…
Reference in New Issue