diff options
Diffstat (limited to 'RedfishPkg/RedfishPlatformConfigDxe')
-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;
|