Signed-off-by: Mike Maslenkin <mike.maslen...@gmail.com>
---
 .../RedfishFeatureUtilityLib.c                        | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
index 0941f33fd73a..e189987850f7 100644
--- 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
+++ 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
@@ -806,6 +806,7 @@ ApplyFeatureSettingsStringArrayType (
       RedfishValue.Value.StringArray[Index] = AllocateCopyPool (AsciiStrSize 
(Buffer->ArrayValue), Buffer->ArrayValue);
       if (RedfishValue.Value.StringArray[Index] == NULL) {
         ASSERT (FALSE);
+        FreePool (RedfishValue.Value.StringArray);
         return EFI_OUT_OF_RESOURCES;
       }
 
@@ -828,6 +829,12 @@ ApplyFeatureSettingsStringArrayType (
     DEBUG ((DEBUG_ERROR, "%a, %a.%a %s array value has no change\n", __func__, 
Schema, Version, ConfigureLang));
   }
 
+  for (Index = 0; Index < RedfishValue.ArrayCount; Index++) {
+    FreePool (RedfishValue.Value.StringArray[Index]);
+  }
+
+  FreePool (RedfishValue.Value.StringArray);
+
   return Status;
 }
 
@@ -927,6 +934,8 @@ ApplyFeatureSettingsNumericArrayType (
     DEBUG ((DEBUG_ERROR, "%a, %a.%a %s array value has no change\n", __func__, 
Schema, Version, ConfigureLang));
   }
 
+  FreePool (RedfishValue.Value.IntegerArray);
+
   return Status;
 }
 
@@ -1026,6 +1035,8 @@ ApplyFeatureSettingsBooleanArrayType (
     DEBUG ((DEBUG_ERROR, "%a, %a.%a %s array value has no change\n", __func__, 
Schema, Version, ConfigureLang));
   }
 
+  FreePool (RedfishValue.Value.BooleanArray);
+
   return Status;
 }
 
-- 
2.32.0 (Apple Git-132)



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


Reply via email to