//\r
// Allocate memory for our protocol. Then fill in the blanks.\r
//\r
- Status = gBS->AllocatePool (\r
- EfiBootServicesData,\r
- sizeof (EFI_EBC_PROTOCOL),\r
- (VOID **) &EbcProtocol\r
- );\r
- if (Status != EFI_SUCCESS) {\r
+ EbcProtocol = AllocatePool (sizeof (EFI_EBC_PROTOCOL));\r
+\r
+ if (EbcProtocol == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
}\r
\r
if (HandleBuffer != NULL) {\r
- gBS->FreePool (HandleBuffer);\r
+ FreePool (HandleBuffer);\r
HandleBuffer = NULL;\r
}\r
//\r
EbcProtocol\r
);\r
if (EFI_ERROR (Status)) {\r
- gBS->FreePool (EbcProtocol);\r
+ FreePool (EbcProtocol);\r
return Status;\r
}\r
}\r
//\r
// Allocate memory for our debug protocol. Then fill in the blanks.\r
//\r
- Status = gBS->AllocatePool (\r
- EfiBootServicesData,\r
- sizeof (EFI_DEBUG_SUPPORT_PROTOCOL),\r
- (VOID **) &EbcDebugProtocol\r
- );\r
- if (Status != EFI_SUCCESS) {\r
+ EbcDebugProtocol = AllocatePool (sizeof (EFI_DEBUG_SUPPORT_PROTOCOL));\r
+\r
+ if (EbcDebugProtocol == NULL) {\r
goto ErrorExit;\r
}\r
\r
// This is recoverable, so free the memory and continue.\r
//\r
if (EFI_ERROR (Status)) {\r
- gBS->FreePool (EbcDebugProtocol);\r
+ FreePool (EbcDebugProtocol);\r
goto ErrorExit;\r
}\r
//\r
}\r
\r
if (HandleBuffer != NULL) {\r
- gBS->FreePool (HandleBuffer);\r
+ FreePool (HandleBuffer);\r
HandleBuffer = NULL;\r
}\r
\r
- gBS->FreePool (EbcProtocol);\r
+ FreePool (EbcProtocol);\r
\r
return Status;\r
}\r
ThunkList = ImageList->ThunkList;\r
while (ThunkList != NULL) {\r
NextThunkList = ThunkList->Next;\r
- gBS->FreePool (ThunkList->ThunkBuffer);\r
- gBS->FreePool (ThunkList);\r
+ FreePool (ThunkList->ThunkBuffer);\r
+ FreePool (ThunkList);\r
ThunkList = NextThunkList;\r
}\r
//\r
//\r
// Now free up the image list element\r
//\r
- gBS->FreePool (ImageList);\r
+ FreePool (ImageList);\r
return EFI_SUCCESS;\r
}\r
\r
//\r
// Allocate a new one\r
//\r
- Status = gBS->AllocatePool (\r
- EfiBootServicesData,\r
- sizeof (EBC_IMAGE_LIST),\r
- (VOID **) &ImageList\r
- );\r
- if (Status != EFI_SUCCESS) {\r
+ ImageList = AllocatePool (sizeof (EBC_IMAGE_LIST));\r
+\r
+ if (ImageList == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
//\r
// Ok, now create a new thunk element to add to the list\r
//\r
- Status = gBS->AllocatePool (\r
- EfiBootServicesData,\r
- sizeof (EBC_THUNK_LIST),\r
- (VOID **) &ThunkList\r
- );\r
- if (Status != EFI_SUCCESS) {\r
+ ThunkList = AllocatePool (sizeof (EBC_THUNK_LIST));\r
+\r
+ if (ThunkList == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
//\r
// Allocate memory for the protocol, then fill in the fields\r
//\r
- Status = gBS->AllocatePool (EfiBootServicesData, sizeof (EFI_EBC_VM_TEST_PROTOCOL), (VOID **) &EbcVmTestProtocol);\r
- if (Status != EFI_SUCCESS) {\r
+ EbcVmTestProtocol = AllocatePool (sizeof (EFI_EBC_VM_TEST_PROTOCOL));\r
+ if (EbcVmTestProtocol == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
EbcVmTestProtocol->Execute = (EBC_VM_TEST_EXECUTE) EbcExecuteInstructions;\r
Handle = NULL;\r
Status = gBS->InstallProtocolInterface (&Handle, &mEfiEbcVmTestProtocolGuid, EFI_NATIVE_INTERFACE, EbcVmTestProtocol);\r
if (EFI_ERROR (Status)) {\r
- gBS->FreePool (EbcVmTestProtocol);\r
+ FreePool (EbcVmTestProtocol);\r
}\r
return Status;\r
}\r