FreePool (HandleBuffer);\r
HandleBuffer = NULL;\r
}\r
- return Status;\r
+ return EFI_SUCCESS;\r
}\r
\r
/**\r
Status = ShellInitialize();\r
ASSERT_EFI_ERROR(Status);\r
\r
- //\r
- // DP dump performance data by parsing FPDT table in ACPI table.\r
- // Folloing 3 steps are to get the measurement form the FPDT table.\r
- //\r
-\r
- //\r
- //1. Get FPDT from ACPI table.\r
- //\r
- Status = GetBootPerformanceTable ();\r
- if (EFI_ERROR(Status)) {\r
- return Status;\r
- }\r
-\r
- //\r
- //2. Cache the ModuleGuid and hanlde mapping table.\r
- //\r
- Status = BuildCachedGuidHandleTable();\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
-\r
- //\r
- //3. Build the measurement array form the FPDT records.\r
- //\r
- Status = BuildMeasurementList ();\r
- if (EFI_ERROR(Status)) {\r
- return Status;\r
- }\r
-\r
//\r
// Process Command Line arguments\r
//\r
#endif // PROFILING_IMPLEMENTED\r
}\r
\r
+ //\r
+ // DP dump performance data by parsing FPDT table in ACPI table.\r
+ // Folloing 3 steps are to get the measurement form the FPDT table.\r
+ //\r
+\r
+ //\r
+ //1. Get FPDT from ACPI table.\r
+ //\r
+ Status = GetBootPerformanceTable ();\r
+ if (EFI_ERROR (Status)) {\r
+ ShellStatus = Status;\r
+ goto Done;\r
+ }\r
+\r
+ //\r
+ //2. Cache the ModuleGuid and hanlde mapping table.\r
+ //\r
+ Status = BuildCachedGuidHandleTable();\r
+ if (EFI_ERROR (Status)) {\r
+ ShellStatus = Status;\r
+ goto Done;\r
+ }\r
+\r
+ //\r
+ //3. Build the measurement array form the FPDT records.\r
+ //\r
+ Status = BuildMeasurementList ();\r
+ if (EFI_ERROR (Status)) {\r
+ ShellStatus = SHELL_OUT_OF_RESOURCES;\r
+ goto Done;\r
+ }\r
+\r
//\r
// Initialize the pre-defined cumulative data.\r
//\r
if (CustomCumulativeToken != NULL) {\r
CustomCumulativeData = AllocateZeroPool (sizeof (PERF_CUM_DATA));\r
if (CustomCumulativeData == NULL) {\r
- return SHELL_OUT_OF_RESOURCES;\r
+ ShellStatus = SHELL_OUT_OF_RESOURCES;\r
+ goto Done;\r
}\r
CustomCumulativeData->MinDur = PERF_MAXDUR;\r
CustomCumulativeData->MaxDur = 0;\r
NameSize = StrLen (CustomCumulativeToken) + 1;\r
CustomCumulativeData->Name = AllocateZeroPool (NameSize);\r
if (CustomCumulativeData->Name == NULL) {\r
- FreePool (CustomCumulativeData);\r
- return SHELL_OUT_OF_RESOURCES;\r
+ ShellStatus = SHELL_OUT_OF_RESOURCES;\r
+ goto Done;\r
}\r
UnicodeStrToAsciiStrS (CustomCumulativeToken, CustomCumulativeData->Name, NameSize);\r
}\r