efi_st_error("LocateHandleBuffer failed to locate new handle\n");
return EFI_ST_FAILURE;
}
- boottime->set_mem(buffer, sizeof(efi_handle_t) * buffer_size, 0);
+ /* Release buffer */
+ ret = boottime->free_pool(buffer);
+ if (ret != EFI_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
/*
* Test error handling in UninstallMultipleProtocols
efi_st_error("LocateHandleBuffer failed to locate new handle\n");
return EFI_ST_FAILURE;
}
+ /* Clear the buffer, we are reusing it it the next step. */
boottime->set_mem(buffer, sizeof(efi_handle_t) * buffer_size, 0);
/*
efi_st_error("LocateHandle failed to locate new handles\n");
return EFI_ST_FAILURE;
}
- boottime->set_mem(buffer, sizeof(efi_handle_t) * buffer_size, 0);
+ /* Release buffer */
+ ret = boottime->free_pool(buffer);
+ if (ret != EFI_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
/*
* Test LocateProtocol
efi_st_error("Failed to get protocols per handle\n");
return EFI_ST_FAILURE;
}
+ /* Release buffer */
+ ret = boottime->free_pool(prot_buffer);
+ if (ret != EFI_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
/*
* Uninstall remaining protocols