mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
91cdd20f70
commit
00324f3fce
|
@ -2331,7 +2331,9 @@ ConvertHandleIndexToHandle(
|
|||
// Verify that LinkWalker->TheHandle is valid handle
|
||||
//
|
||||
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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue