xwayland: Clean up drm lease when terminating. #946
In xwl_randr_terminate_lease(), we free the struct xwl_drm_lease* pointer at RRLeasePtr lease->devPrivate. However, that pointer is still set at struct xwl_output->lease, so we need to also free that one.
In drm_lease_handle_finished(), it already sets NULL if the fd returned was invalid. If the fd was valid, it calls RRTerminateLease(), which then calls xwl_randr_terminate_lease(), and now does the same thing.
This fixes exiting and relaunching Steam VR on xwayland. I have tested this on sway. It interacts with xwl_randr_request_lease() when it checks "if (... || output->lease) { return BadValue; }". Now that field is properly set to NULL and the function can complete successfully.
Fixes for xwayland: xserver issue 946 #946
Signed-off-by: russellc@nvidia.com