summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-18 03:26:54 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-18 03:26:54 +0000
commit1f1cb2f2166f48a63b54dfc40f43c1a998e00a37 (patch)
treeccb8e2cdaa13bdbed7c520d3e329bcd9211d13fd /MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
parentb347c1bceb394b394ce26500bb900417a730194c (diff)
downloadedk2-platforms-1f1cb2f2166f48a63b54dfc40f43c1a998e00a37.tar.xz
Retire original HII APIs: IfrLibExtractDefault and ConstructConfigAltResp, which are replaced by HiiSetToDefaults API.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8319 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c')
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 2761be1018..fe03596971 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -873,9 +873,10 @@ ParseIfrData (
LengthString = StrLen (GuidStr);
LengthString = LengthString + StrLen (NameStr) + 1;
TempStr = AllocateZeroPool (LengthString * sizeof (CHAR16));
- if (TempStr == NULL) {
- FreePool (GuidStr);
- FreePool (NameStr);
+ FreePool (GuidStr);
+ FreePool (NameStr);
+ if (TempStr == NULL) {
+ FreePool (VarStoreName);
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
@@ -899,8 +900,6 @@ ParseIfrData (
// Free alllocated temp string.
//
FreePool (TempStr);
- FreePool (GuidStr);
- FreePool (NameStr);
break;
case EFI_IFR_DEFAULTSTORE_OP:
@@ -2211,13 +2210,13 @@ HiiConfigRoutingExtractConfig (
if (EFI_ERROR (Status)) {
goto Done;
}
- //
- // Not any request block is found.
- //
- if (StrStr (ConfigRequest, L"&OFFSET=") == NULL) {
+ //
+ // Not any request block is found.
+ //
+ if (StrStr (ConfigRequest, L"&OFFSET=") == NULL) {
AccessResults = AllocateCopyPool (StrSize (ConfigRequest), ConfigRequest);
- goto NextConfigString;
- }
+ goto NextConfigString;
+ }
}
//
@@ -2307,7 +2306,7 @@ NextConfigString:
Done:
if (EFI_ERROR (Status)) {
FreePool (*Results);
- *Results = NULL;
+ *Results = NULL;
}
if (ConfigRequest != NULL) {
@@ -2964,8 +2963,8 @@ HiiBlockToConfig (
Exit:
if (*Config != NULL) {
- FreePool (*Config);
- *Config = NULL;
+ FreePool (*Config);
+ *Config = NULL;
}
if (ValueStr != NULL) {
FreePool (ValueStr);