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 (#111628): https://edk2.groups.io/g/devel/message/111628
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