diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 943269733..2a93a6ab9 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -540,6 +540,10 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id, else if (strcmp(interface, wp_drm_lease_device_v1_interface.name) == 0) { if (xwl_screen->screen->root == NULL) { struct xwl_queued_drm_lease_device *queued = malloc(sizeof(struct xwl_queued_drm_lease_device)); + if (!queued) { + ErrorF("%s: ENOMEM\n", __func__); + return; + } queued->id = id; xorg_list_append(&queued->link, &xwl_screen->queued_drm_lease_devices); } else {