diff options
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index fe03596971..2f5118e512 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -873,9 +873,9 @@ ParseIfrData ( LengthString = StrLen (GuidStr);
LengthString = LengthString + StrLen (NameStr) + 1;
TempStr = AllocateZeroPool (LengthString * sizeof (CHAR16));
- FreePool (GuidStr);
- FreePool (NameStr);
if (TempStr == NULL) {
+ FreePool (GuidStr);
+ FreePool (NameStr);
FreePool (VarStoreName);
Status = EFI_OUT_OF_RESOURCES;
goto Done;
@@ -899,6 +899,8 @@ ParseIfrData ( //
// Free alllocated temp string.
//
+ FreePool (GuidStr);
+ FreePool (NameStr);
FreePool (TempStr);
break;
|