From 67f7e37652e0ebbd51df51923a0cebf9bb8bfbfa Mon Sep 17 00:00:00 2001 From: davidhuang Date: Mon, 11 Jan 2010 05:54:01 +0000 Subject: 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 --- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 { // -- cgit v1.2.3