mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
c/main: fix use after free in direct wayland introduced in !2278
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2328>
This commit is contained in:
parent
e4bcbb6aeb
commit
b1117a7854
|
@ -334,11 +334,11 @@ _drm_lease_device_released(void *data, struct wp_drm_lease_device_v1 *wp_drm_lea
|
|||
{
|
||||
struct direct_wayland_lease_device *dev = data;
|
||||
COMP_ERROR(dev->w->base.base.c, "Releasing lease device %s", dev->path);
|
||||
direct_wayland_lease_device_destroy(dev);
|
||||
if (dev == dev->w->selected_device) {
|
||||
dev->w->selected_device = NULL;
|
||||
dev->w->selected_connector = NULL;
|
||||
}
|
||||
direct_wayland_lease_device_destroy(dev);
|
||||
}
|
||||
|
||||
static const struct wp_drm_lease_device_v1_listener drm_lease_device_listener = {
|
||||
|
|
Loading…
Reference in a new issue