Some codes have been altered and replaced by library functions which makes more efficient and rational.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7065 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jji4 2008-12-17 09:20:16 +00:00
parent cd15d4715c
commit 6c94a00d0e

View File

@ -552,7 +552,7 @@ SCSIBusDriverBindingStop (
This->DriverBindingHandle, This->DriverBindingHandle,
Controller Controller
); );
gBS->FreePool (ScsiBusDev); FreePool (ScsiBusDev);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -624,7 +624,7 @@ SCSIBusDriverBindingStop (
); );
} }
} else { } else {
gBS->FreePool (ScsiIoDevice); FreePool (ScsiIoDevice);
} }
} }
@ -997,6 +997,7 @@ ScsiScanCreateDevice (
// //
// Set Device Path // Set Device Path
// //
ScsiDevicePath = NULL;
if (ScsiIoDevice->ExtScsiSupport){ if (ScsiIoDevice->ExtScsiSupport){
Status = ScsiIoDevice->ExtScsiPassThru->BuildDevicePath ( Status = ScsiIoDevice->ExtScsiPassThru->BuildDevicePath (
ScsiIoDevice->ExtScsiPassThru, ScsiIoDevice->ExtScsiPassThru,
@ -1030,10 +1031,10 @@ ScsiScanCreateDevice (
// ScsiPassThru->BuildDevicePath() function; It is no longer used // ScsiPassThru->BuildDevicePath() function; It is no longer used
// after EfiAppendDevicePathNode,so free the memory it occupies. // after EfiAppendDevicePathNode,so free the memory it occupies.
// //
gBS->FreePool (ScsiDevicePath); FreePool (ScsiDevicePath);
if (ScsiIoDevice->DevicePath == NULL) { if (ScsiIoDevice->DevicePath == NULL) {
gBS->FreePool (ScsiIoDevice); FreePool (ScsiIoDevice);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }