Thanks for fixing memory leak issue.

Reviewed-by: Nickle Wang <[email protected]>

Regards,
Nickle

> -----Original Message-----
> From: Mike Maslenkin <[email protected]>
> Sent: Thursday, November 23, 2023 8:01 AM
> To: [email protected]
> Cc: [email protected]; Nickle Wang <[email protected]>;
> [email protected]
> Subject: [PATCH v2 1/3] RedfishPkg: fix memory leak in HiiUtilityLib
> 
> External email: Use caution opening links or attachments
> 
> 
> Cc: Abner Chang <[email protected]>
> Cc: Nickle Wang <[email protected]>
> Cc: Igor Kulchytskyy <[email protected]>
> Signed-off-by: Mike Maslenkin <[email protected]>
> ---
>  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: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to