[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.ch...@amd.com>

> -----Original Message-----
> From: Mike Maslenkin <mike.maslen...@gmail.com>
> Sent: Friday, December 15, 2023 7:25 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <abner.ch...@amd.com>; nick...@nvidia.com;
> ig...@ami.com; Mike Maslenkin <mike.maslen...@gmail.com>
> Subject: [PATCH v2 05/14] RedfishPkg: RedfishDiscoverDxe: fix memory leak
> on error path.
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Cc: Abner Chang <abner.ch...@amd.com>
> Cc: Nickle Wang <nick...@nvidia.com>
> Cc: Igor Kulchytskyy <ig...@ami.com>
> Signed-off-by: Mike Maslenkin <mike.maslen...@gmail.com>
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> index 06d8d00da7fb..e344e06d8dcc 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
> @@ -829,6 +829,10 @@ AddAndSignalNewRedfishService (
>      } while (TRUE);
>
>    }
>
>
>
> +  if (Char16Uuid != NULL) {
>
> +    FreePool (Char16Uuid);
>
> +  }
>
> +
>
>    if (NewFound || InfoRefresh) {
>
>      if (!InfoRefresh) {
>
>        DiscoveredList = (EFI_REDFISH_DISCOVERED_INTERNAL_LIST
> *)AllocateZeroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_LIST));
>
> @@ -907,10 +911,6 @@ AddAndSignalNewRedfishService (
>      }
>
>    }
>
>
>
> -  if (Char16Uuid != NULL) {
>
> -    FreePool ((VOID *)Char16Uuid);
>
> -  }
>
> -
>
>    Status = EFI_SUCCESS;
>
>    if (NewFound || InfoRefresh) {
>
>      //
>
> --
> 2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112621): https://edk2.groups.io/g/devel/message/112621
Mute This Topic: https://groups.io/mt/103181040/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to