Commit 018a41a1 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

wayland: Fix lease termination in wp_lease_v1_destroy()

If a drm lease is destroyed, e.g. the app has unexpectedly terminated,
only the finished event will be sent. The leaseRevoked signal won't be
emitted so the drm backend can't clean up DrmOutput::m_lease. Since
m_lease can be a dangling pointer, the drm backend can crash in
DrmGpu::updateOutputs() when it tries to determine if m_lease is still
alive and was not terminated by closing the lease fd on the client side.
parent b9bc1479
Pipeline #223078 failed with stage
in 17 minutes and 32 seconds
......@@ -320,7 +320,12 @@ DrmLeaseV1Interface::DrmLeaseV1Interface(DrmLeaseDeviceV1InterfacePrivate *devic
DrmLeaseV1Interface::~DrmLeaseV1Interface()
{
deny();
if (d->lesseeId) {
revoke();
} else {
deny();
}
d->device->leases.removeOne(this);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment