]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
Retire original HII APIs: IfrLibExtractDefault and ConstructConfigAltResp, which...
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / ConfigRouting.c
index 2761be1018acf01565270211c88308610003a7e4..fe035969717bc10f337b873f180a2d3aa2ab79d1 100644 (file)
@@ -873,9 +873,10 @@ ParseIfrData (
       LengthString = StrLen (GuidStr);\r
       LengthString = LengthString + StrLen (NameStr) + 1;\r
       TempStr = AllocateZeroPool (LengthString * sizeof (CHAR16));\r
-      if (TempStr == NULL) {\r
-        FreePool (GuidStr);\r
-        FreePool (NameStr);\r
+      FreePool (GuidStr);\r
+      FreePool (NameStr);\r
+    if (TempStr == NULL) {\r
+        FreePool (VarStoreName);\r
         Status = EFI_OUT_OF_RESOURCES;\r
         goto Done;\r
       }\r
@@ -899,8 +900,6 @@ ParseIfrData (
       // Free alllocated temp string.\r
       //\r
       FreePool (TempStr);\r
-      FreePool (GuidStr);\r
-      FreePool (NameStr);\r
       break;\r
 \r
     case EFI_IFR_DEFAULTSTORE_OP:\r
@@ -2211,13 +2210,13 @@ HiiConfigRoutingExtractConfig (
       if (EFI_ERROR (Status)) {\r
         goto Done;\r
       }\r
-         //\r
-         // Not any request block is found.\r
-         //\r
-         if (StrStr (ConfigRequest, L"&OFFSET=") == NULL) {\r
+      //\r
+      // Not any request block is found.\r
+      //\r
+      if (StrStr (ConfigRequest, L"&OFFSET=") == NULL) {\r
         AccessResults = AllocateCopyPool (StrSize (ConfigRequest), ConfigRequest);\r
-               goto NextConfigString;\r
-         }\r
+        goto NextConfigString;\r
+      }\r
     }\r
 \r
     //\r
@@ -2307,7 +2306,7 @@ NextConfigString:
 Done:\r
   if (EFI_ERROR (Status)) {\r
     FreePool (*Results);\r
-       *Results = NULL;\r
+  *Results = NULL;\r
   }\r
   \r
   if (ConfigRequest != NULL) {\r
@@ -2964,8 +2963,8 @@ HiiBlockToConfig (
 \r
 Exit:\r
   if (*Config != NULL) {\r
-       FreePool (*Config);\r
-       *Config = NULL;\r
+  FreePool (*Config);\r
+  *Config = NULL;\r
   }\r
   if (ValueStr != NULL) {\r
     FreePool (ValueStr);\r