summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authordavidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-11 05:54:01 +0000
committerdavidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-11 05:54:01 +0000
commit67f7e37652e0ebbd51df51923a0cebf9bb8bfbfa (patch)
tree005746f0f05535073aa0f00943b6bc86f9f3cb40 /MdeModulePkg
parentd548f0a10cd1aa12f10bda28c5049656b4c16250 (diff)
downloadedk2-platforms-67f7e37652e0ebbd51df51923a0cebf9bb8bfbfa.tar.xz
1. Add missing CloseProtocol in case RemainingDevicePath is NULL or EndOfDp
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9707 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index 7263403abb..e0d35b7550 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -174,6 +174,15 @@ SCSIBusDriverBindingSupported (
// if yes, return EFI_SUCCESS.
//
if ((RemainingDevicePath == NULL) || IsDevicePathEnd (RemainingDevicePath)) {
+ //
+ // Close protocol regardless of RemainingDevicePath validation
+ //
+ gBS->CloseProtocol (
+ Controller,
+ &gEfiExtScsiPassThruProtocolGuid,
+ This->DriverBindingHandle,
+ Controller
+ );
return EFI_SUCCESS;
} else {
//