Thanks for addressing this issue.
Reviewed-by: Nickle Wang <nick...@nvidia.com> Regards, Nickle > -----Original Message----- > From: abner.ch...@amd.com <abner.ch...@amd.com> > Sent: Tuesday, March 26, 2024 11:15 PM > To: devel@edk2.groups.io > Cc: Nickle Wang <nick...@nvidia.com>; Igor Kulchytskyy <ig...@ami.com> > Subject: [PATCH V2 4/6] RedfishPkg/RedfishPlatformConfigDxe: HII string is > deleted unexpectedly > > External email: Use caution opening links or attachments > > > From: Abner Chang <abner.ch...@amd.com> > > Add the condition check when delete HII string. > Only when the HiiStatement operand equal to "EFI_IFR_STRING_OP" > and the statement value type = EFI_IFR_TYPE_STRING. > > Signed-off-by: Abner Chang <abner.ch...@amd.com> > Co-authored-by: Nickle Wang <nick...@nvidia.com> > Cc: Igor Kulchytskyy <ig...@ami.com> > --- > .../RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > index 8a02c839035..d165799f9a1 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > @@ -1873,8 +1873,11 @@ RedfishPlatformConfigSetStatementCommon ( > DEBUG ((DEBUG_ERROR, "%a: failed to save question value: %r\n", __func__, > Status)); > } > > - if (StatementValue->Value.string != 0) { > - HiiDeleteString (StatementValue->Value.string, TargetStatement- > >ParentForm->ParentFormset->HiiHandle); > + if ((TargetStatement->HiiStatement->Operand == EFI_IFR_STRING_OP) && > (StatementValue->Type == EFI_IFR_TYPE_STRING)) { > + if (StatementValue->Value.string != 0) { > + // Delete HII string which was created for HII statement operand = > EFI_IFR_STRING_OP and Type = EFI_IFR_TYPE_STRING. > + HiiDeleteString (StatementValue->Value.string, TargetStatement- > >ParentForm->ParentFormset->HiiHandle); > + } > } > > return Status; > -- > 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117154): https://edk2.groups.io/g/devel/message/117154 Mute This Topic: https://groups.io/mt/105159786/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-