ShellPkg/UefiHandleParsingLib: Fix memory leak
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 00324f3fce
)
This commit is contained in:
@ -2331,7 +2331,9 @@ ConvertHandleIndexToHandle(
|
|||||||
// Verify that LinkWalker->TheHandle is valid handle
|
// Verify that LinkWalker->TheHandle is valid handle
|
||||||
//
|
//
|
||||||
Status = gBS->ProtocolsPerHandle(ListWalker->TheHandle, &ProtocolBuffer, &ProtocolCount);
|
Status = gBS->ProtocolsPerHandle(ListWalker->TheHandle, &ProtocolBuffer, &ProtocolCount);
|
||||||
if (EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
FreePool (ProtocolBuffer);
|
||||||
|
} else {
|
||||||
//
|
//
|
||||||
// TheHandle is not valid, so do not add to handle list
|
// TheHandle is not valid, so do not add to handle list
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user