Thanks for fixing memory leak issue.

Reviewed-by: Nickle Wang <nick...@nvidia.com>

Regards,
Nickle

> -----Original Message-----
> From: Mike Maslenkin <mike.maslen...@gmail.com>
> Sent: Thursday, November 23, 2023 8:01 AM
> To: devel@edk2.groups.io
> Cc: abner.ch...@amd.com; Nickle Wang <nick...@nvidia.com>;
> ig...@ami.com
> Subject: [PATCH v2 1/3] RedfishPkg: fix memory leak in HiiUtilityLib
> 
> External email: Use caution opening links or attachments
> 
> 
> 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/Library/HiiUtilityLib/HiiUtilityLib.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/RedfishPkg/Library/HiiUtilityLib/HiiUtilityLib.c
> b/RedfishPkg/Library/HiiUtilityLib/HiiUtilityLib.c
> index 168b4459844f..fd322c2086d8 100644
> --- a/RedfishPkg/Library/HiiUtilityLib/HiiUtilityLib.c
> +++ b/RedfishPkg/Library/HiiUtilityLib/HiiUtilityLib.c
> @@ -388,11 +388,13 @@ SetQuestionValue (
>        Question->Value.BufferLen = Question->StorageWidth;
> 
>        Question->Value.Buffer    = AllocateZeroPool (Question->StorageWidth);
> 
>        if (Question->Value.Buffer == NULL) {
> 
> +        FreePool (TemString);
> 
>          return EFI_OUT_OF_RESOURCES;
> 
>        }
> 
> 
> 
>        CopyMem (Question->Value.Buffer, TemString, StrSize (TemString));
> 
>        Src = Question->Value.Buffer;
> 
> +      FreePool (TemString);
> 
>      } else {
> 
>        CopyMem (&Question->Value.Value, &QuestionValue->Value, sizeof
> (EFI_IFR_TYPE_VALUE));
> 
>        Src = (UINT8 *)&Question->Value.Value;
> 
> --
> 2.32.0 (Apple Git-132)



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


Reply via email to