diff options
author | Nickle Wang <nicklew@nvidia.com> | 2023-07-21 21:39:10 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-09-13 03:23:24 +0000 |
commit | 4a1afea6f7361fd65e9d4ba34eaac48ec8bb2867 (patch) | |
tree | 1b67e28cb31931e7acdbfed266468f9b548698ab /RedfishPkg | |
parent | b844b106e2a20c709ece1b2b89b2ae0e84a0e401 (diff) | |
download | edk2-4a1afea6f7361fd65e9d4ba34eaac48ec8bb2867.tar.gz |
RedfishPkg/RedfishPlatformConfigDxe: fix can not set one-of option issue.
StatementValue->Buffer is converted from ASCII to Unicode by caller
already so we don't have to convert it again.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Reviewed-by: Igor Kulchytskyy <igork@ami.com>
Diffstat (limited to 'RedfishPkg')
-rw-r--r-- | RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c index f2a8e77d9b..30d2ef351e 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c @@ -1660,12 +1660,11 @@ RedfishPlatformConfigSetStatementCommon ( // in string format from HII point of view. Do a patch here.
//
if ((TargetStatement->HiiStatement->Operand == EFI_IFR_ONE_OF_OP) && (StatementValue->Type == EFI_IFR_TYPE_STRING)) {
- TempBuffer = StrToUnicodeStr ((CHAR8 *)StatementValue->Buffer);
- if (TempBuffer == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- FreePool (StatementValue->Buffer);
+ //
+ // Keep input buffer to TempBuffer because StatementValue will be
+ // assigned in HiiStringToOneOfOptionValue().
+ //
+ TempBuffer = (EFI_STRING)StatementValue->Buffer;
StatementValue->Buffer = NULL;
StatementValue->BufferLen = 0;
|