From: jji4 Date: Wed, 17 Dec 2008 09:20:16 +0000 (+0000) Subject: Some codes have been altered and replaced by library functions which makes more effic... X-Git-Tag: edk2-stable201903~19182 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6c94a00d0e4ae6e8cb9814db5b77e13644045f2f;p=mirror_edk2.git 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 --- diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 9b9a5d5e14..7ee8c50728 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -552,7 +552,7 @@ SCSIBusDriverBindingStop ( This->DriverBindingHandle, Controller ); - gBS->FreePool (ScsiBusDev); + FreePool (ScsiBusDev); return EFI_SUCCESS; } @@ -624,7 +624,7 @@ SCSIBusDriverBindingStop ( ); } } else { - gBS->FreePool (ScsiIoDevice); + FreePool (ScsiIoDevice); } } @@ -997,6 +997,7 @@ ScsiScanCreateDevice ( // // Set Device Path // + ScsiDevicePath = NULL; if (ScsiIoDevice->ExtScsiSupport){ Status = ScsiIoDevice->ExtScsiPassThru->BuildDevicePath ( ScsiIoDevice->ExtScsiPassThru, @@ -1030,10 +1031,10 @@ ScsiScanCreateDevice ( // ScsiPassThru->BuildDevicePath() function; It is no longer used // after EfiAppendDevicePathNode,so free the memory it occupies. // - gBS->FreePool (ScsiDevicePath); + FreePool (ScsiDevicePath); if (ScsiIoDevice->DevicePath == NULL) { - gBS->FreePool (ScsiIoDevice); + FreePool (ScsiIoDevice); return EFI_OUT_OF_RESOURCES; }