tu: Free `device->bo_idx` and `device->bo_list` on init failure
Two related changes:
-
in
tu_device.c:tu_CreateDevice
we need to free both pointers in the teardown path aftertu_bo_finish(global_bo)
, which uses the pointers. They are allocated in the first call totu_bo_init()
, which happens whenglobal_bo
is allocated. -
in
tu_drm.c:tu_bo_init
we need to freebo_list
if thebo_idx
allocation fails. Convert to the goto teardown pattern as well.
Fixes the following dEQP-VK tests:
- dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail
- dEQP-VK.api.object_management.alloc_callback_fail.device
- dEQP-VK.api.object_management.alloc_callback_fail.device_group