xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 20 07:02:40 UTC 2022


 hw/xwayland/xwayland-drm-lease.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 479c8aae8e6e6059f77be8de79726e7f6eac61a9
Author: Weng Xuetian <wengxt at gmail.com>
Date:   Sat Apr 16 01:40:45 2022 -0700

    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 at redhat.com>
    Signed-off-by: Weng Xuetian <wengxt at gmail.com>

diff --git a/hw/xwayland/xwayland-drm-lease.c b/hw/xwayland/xwayland-drm-lease.c
index 656e6a62d..8bbb27e70 100644
--- a/hw/xwayland/xwayland-drm-lease.c
+++ b/hw/xwayland/xwayland-drm-lease.c
@@ -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


More information about the xorg-commit mailing list