It's unclear why the new string is allocated as copy of the original string if its pointer is stored in an array and the original string is released immediately after the copy is created. All data allocated in the same pool.
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> --- .../RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c index cbc65ba59408..f970e317b3f6 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c @@ -2057,9 +2057,7 @@ RedfishPlatformConfigProtocolGetConfigureLang ( TmpString = HiiGetRedfishString (StatementRef->Statement->ParentForm->ParentFormset->HiiHandle, FullSchema, StatementRef->Statement->Description); ASSERT (TmpString != NULL); if (TmpString != NULL) { - TmpConfigureLangList[Index] = AllocateCopyPool (StrSize (TmpString), TmpString); - ASSERT (TmpConfigureLangList[Index] != NULL); - FreePool (TmpString); + TmpConfigureLangList[Index] = TmpString; ++Index; } } -- 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112553): https://edk2.groups.io/g/devel/message/112553 Mute This Topic: https://groups.io/mt/103181039/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-