xwayland: Fix invalid pointer access in drm_lease_device_handle_released.

drm_lease_device_handle_released uses the wrong pointer type in the
callback. This will cause crash when compositor removes drm lease device
object.

Fixes: 089e7f98f - Xwayland: implement drm-lease-v1

Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Weng Xuetian <wengxt@gmail.com>
This commit is contained in:
Weng Xuetian 2022-04-16 01:40:45 -07:00
parent 6d468c68d6
commit 479c8aae8e
No known key found for this signature in database
GPG Key ID: 8E8B898CBF2412F9

View File

@ -386,7 +386,8 @@ static void
drm_lease_device_handle_released(void *data,
struct wp_drm_lease_device_v1 *wp_drm_lease_device_v1)
{
xwl_screen_destroy_drm_lease_device(data, wp_drm_lease_device_v1);
struct xwl_drm_lease_device *lease_device = data;
xwl_screen_destroy_drm_lease_device(lease_device->xwl_screen, wp_drm_lease_device_v1);
}
static void