radv: plug leaks in radv_device_init_accel_struct_build_state
Fixes: 0dad88b469
("radv: Implement device-side BVH building.")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13110>
This commit is contained in:
@@ -1382,6 +1382,9 @@ radv_device_init_accel_struct_build_state(struct radv_device *device)
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
ralloc_free(internal_cs);
|
||||
ralloc_free(leaf_cs);
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
||||
fail:
|
||||
@@ -1523,4 +1526,4 @@ radv_CmdBuildAccelerationStructuresKHR(
|
||||
}
|
||||
free(bvh_states);
|
||||
radv_meta_restore(&saved_state, cmd_buffer);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user