mirror of https://github.com/acidanthera/audk.git
RedfishPkg: fix memory leak in HiiUtilityLib
Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
This commit is contained in:
parent
59b6b5059b
commit
ed923afda5
|
@ -388,11 +388,13 @@ SetQuestionValue (
|
|||
Question->Value.BufferLen = Question->StorageWidth;
|
||||
Question->Value.Buffer = AllocateZeroPool (Question->StorageWidth);
|
||||
if (Question->Value.Buffer == NULL) {
|
||||
FreePool (TemString);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
CopyMem (Question->Value.Buffer, TemString, StrSize (TemString));
|
||||
Src = Question->Value.Buffer;
|
||||
FreePool (TemString);
|
||||
} else {
|
||||
CopyMem (&Question->Value.Value, &QuestionValue->Value, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
Src = (UINT8 *)&Question->Value.Value;
|
||||
|
|
Loading…
Reference in New Issue