Some codes have been altered and replaced by functions of memory allocation library.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7072 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -429,11 +429,11 @@ SCSIBusDriverBindingStart (
|
||||
}
|
||||
FreePool (ScsiTargetId);
|
||||
return EFI_SUCCESS;
|
||||
|
||||
|
||||
ErrorExit:
|
||||
|
||||
if (ScsiBusDev != NULL) {
|
||||
gBS->FreePool (ScsiBusDev);
|
||||
FreePool (ScsiBusDev);
|
||||
}
|
||||
|
||||
if (ExtScsiSupport) {
|
||||
@@ -854,13 +854,9 @@ ScsiExecuteSCSICommand (
|
||||
);
|
||||
} else {
|
||||
|
||||
Status = gBS->AllocatePool (
|
||||
EfiBootServicesData,
|
||||
sizeof(EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET),
|
||||
(VOID**)&mWorkingBuffer
|
||||
);
|
||||
mWorkingBuffer = AllocatePool (sizeof(EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET));
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (mWorkingBuffer == NULL) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@@ -900,7 +896,7 @@ ScsiExecuteSCSICommand (
|
||||
);
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
gBS->FreePool(mWorkingBuffer);
|
||||
FreePool(mWorkingBuffer);
|
||||
gBS->CloseEvent(PacketEvent);
|
||||
return Status;
|
||||
}
|
||||
@@ -1047,7 +1043,7 @@ ScsiScanCreateDevice (
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->FreePool (ScsiIoDevice);
|
||||
FreePool (ScsiIoDevice);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
if (ScsiBusDev->ExtScsiSupport) {
|
||||
|
Reference in New Issue
Block a user