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.
This commit is contained in:
parent
b9bc1479f8
commit
018a41a123
1 changed files with 6 additions and 1 deletions
|
@ -320,7 +320,12 @@ DrmLeaseV1Interface::DrmLeaseV1Interface(DrmLeaseDeviceV1InterfacePrivate *devic
|
|||
|
||||
DrmLeaseV1Interface::~DrmLeaseV1Interface()
|
||||
{
|
||||
deny();
|
||||
if (d->lesseeId) {
|
||||
revoke();
|
||||
} else {
|
||||
deny();
|
||||
}
|
||||
|
||||
d->device->leases.removeOne(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue