diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c index 2245fc7473..fe96e2c098 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c @@ -410,6 +410,10 @@ BdsLibConnectUsbDevByShortFormDP( } } + if (HandleArray != NULL) { + FreePool (HandleArray); + } + if (AtLeastOneConnected) { return EFI_SUCCESS; }