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
// Free alllocated temp string.\r
//\r
FreePool (TempStr);\r
- FreePool (GuidStr);\r
- FreePool (NameStr);\r
break;\r
\r
case EFI_IFR_DEFAULTSTORE_OP:\r
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
Done:\r
if (EFI_ERROR (Status)) {\r
FreePool (*Results);\r
- *Results = NULL;\r
+ *Results = NULL;\r
}\r
\r
if (ConfigRequest != NULL) {\r
\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