Cc: Leif Lindholm <leif.lindh...@linaro.org> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <paulo.alc.cavalca...@hp.com> --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c | 8 ++++---- ArmPlatformPkg/Bds/BootOptionSupport.c | 10 ++++++++++ ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c | 2 ++ 3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c index 8c42814..19d9212 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c @@ -100,7 +100,7 @@ InternalFindFdtByGuid ( (VOID **) &FvProtocol ); if (EFI_ERROR (Status)) { - return Status; + goto Done; } // Allocate Key @@ -115,7 +115,7 @@ InternalFindFdtByGuid ( break; } if (EFI_ERROR (Status)) { - return Status; + goto Done; } // @@ -128,6 +128,7 @@ InternalFindFdtByGuid ( *FdtDevicePath = AppendDevicePathNode (FvDevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&FileDevicePath); } + FreePool (Key); goto Done; } } while (TRUE); @@ -137,10 +138,9 @@ InternalFindFdtByGuid ( if (Index == HandleCount) { Status = EFI_NOT_FOUND; } - return Status; Done: - FreePool (Key); + FreePool (HandleBuffer); return Status; } diff --git a/ArmPlatformPkg/Bds/BootOptionSupport.c b/ArmPlatformPkg/Bds/BootOptionSupport.c index 27faf00..fb70545 100644 --- a/ArmPlatformPkg/Bds/BootOptionSupport.c +++ b/ArmPlatformPkg/Bds/BootOptionSupport.c @@ -266,6 +266,8 @@ BdsLoadOptionFileSystemList ( } } + FreePool (HandleBuffer); + return EFI_SUCCESS; } @@ -495,6 +497,8 @@ BdsLoadOptionMemMapList ( } } } + FreePool (DevicePathHandleBuffer); + if (IsParent) { continue; } @@ -512,6 +516,8 @@ BdsLoadOptionMemMapList ( } } + FreePool (HandleBuffer); + return EFI_SUCCESS; } @@ -684,6 +690,8 @@ BdsLoadOptionPxeList ( } } + FreePool (HandleBuffer); + return EFI_SUCCESS; } @@ -849,6 +857,8 @@ BdsLoadOptionTftpList ( InsertTailList (BdsLoadOptionList, &SupportedDevice->Link); } + FreePool (HandleBuffer); + return EFI_SUCCESS; } diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c index 4a5f2be..b7c9895 100644 --- a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c +++ b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c @@ -413,6 +413,8 @@ EblDevicePaths ( Print (L"[0x%X] %s\n",(UINTN)HandleBuffer[Index], String); } + FreePool (HandleBuffer); + return EFI_SUCCESS; } -- 2.6.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel