diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c index c57b0c80ca..1ed79023a3 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c @@ -1001,7 +1001,7 @@ Uhci2AsyncInterruptTransfer ( // // Allocate and map source data buffer for bus master access. // - DataPtr = AllocatePool (DataLength); + DataPtr = UsbHcAllocateMem (Uhc->MemPool, DataLength); if (DataPtr == NULL) { return EFI_OUT_OF_RESOURCES; diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c index f56fa2b4b1..759f7a05cb 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c @@ -798,7 +798,7 @@ UhciFreeAsyncReq ( } if (AsyncReq->Data != NULL) { - gBS->FreePool (AsyncReq->Data); + UsbHcFreeMem (Uhc->MemPool, AsyncReq->Data, AsyncReq->DataLen); } gBS->FreePool (AsyncReq);