It is required to free previously allocated strings stored in
DiscoveredInstance->Information structure.

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c 
b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
index ff0c3ff1d1f5..bbd1f4b86400 100644
--- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
+++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
@@ -961,6 +961,8 @@ AddAndSignalNewRedfishService (
         FreePool ((VOID *)DiscoveredList);
         return EFI_OUT_OF_RESOURCES;
       }
+    } else {
+      FreeInformationData (&DiscoveredInstance->Information);
     }
 
     DEBUG ((DEBUG_MANAGEABILITY, "*** Redfish Service Information ***\n"));
-- 
2.32.0 (Apple Git-132)



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


Reply via email to