From 1f1cb2f2166f48a63b54dfc40f43c1a998e00a37 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 18 May 2009 03:26:54 +0000 Subject: 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 --- .../Universal/DriverSampleDxe/DriverSample.c | 2 +- .../Universal/HiiDatabaseDxe/ConfigRouting.c | 27 +++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'MdeModulePkg/Universal') diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 254f7f9581..39e72909da 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -418,7 +418,7 @@ ExtractConfig ( if (Request == NULL) { FreePool (ConfigRequest); - *Progress = NULL; + *Progress = NULL; } return Status; 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); -- cgit v1.2.3