mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
anv: Free intel_perf_config when destroying physical device
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29077>
This commit is contained in:
parent
4b179e7bea
commit
a941ce746a
2 changed files with 4 additions and 6 deletions
|
|
@ -2579,7 +2579,7 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
|
|||
return VK_SUCCESS;
|
||||
|
||||
fail_perf:
|
||||
ralloc_free(device->perf);
|
||||
intel_perf_free(device->perf);
|
||||
free(device->engine_info);
|
||||
anv_physical_device_free_disk_cache(device);
|
||||
fail_compiler:
|
||||
|
|
@ -2606,7 +2606,7 @@ anv_physical_device_destroy(struct vk_physical_device *vk_device)
|
|||
free(device->engine_info);
|
||||
anv_physical_device_free_disk_cache(device);
|
||||
ralloc_free(device->compiler);
|
||||
ralloc_free(device->perf);
|
||||
intel_perf_free(device->perf);
|
||||
close(device->local_fd);
|
||||
if (device->master_fd >= 0)
|
||||
close(device->master_fd);
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@
|
|||
void
|
||||
anv_physical_device_init_perf(struct anv_physical_device *device, int fd)
|
||||
{
|
||||
device->perf = NULL;
|
||||
|
||||
struct intel_perf_config *perf = intel_perf_new(NULL);
|
||||
|
||||
intel_perf_init_metrics(perf, &device->info, fd,
|
||||
|
|
@ -85,8 +83,8 @@ anv_physical_device_init_perf(struct anv_physical_device *device, int fd)
|
|||
|
||||
return;
|
||||
|
||||
err:
|
||||
ralloc_free(perf);
|
||||
err:
|
||||
intel_perf_free(perf);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue