LengthString = StrLen (GuidStr);\r
LengthString = LengthString + StrLen (NameStr) + 1;\r
TempStr = AllocateZeroPool (LengthString * sizeof (CHAR16));\r
- FreePool (GuidStr);\r
- FreePool (NameStr);\r
if (TempStr == NULL) {\r
+ FreePool (GuidStr);\r
+ FreePool (NameStr);\r
FreePool (VarStoreName);\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
// Free alllocated temp string.\r
//\r
+ FreePool (GuidStr);\r
+ FreePool (NameStr);\r
FreePool (TempStr);\r
break;\r
\r