My KWIN fork where I work on features like per-output virtual desktops
Find a file
Martin Gräßlin 0649c8e51e [server] Use deleteLater when a ClientConnection gets destroyed
Summary:
In the situation that a wl_client gets destroyed while still
wl_resources are around it can happen that one of them calls into the
ClientConnection during the cleanup handling which gets triggered at the
same time. This can then trigger a crash.

This change uses deleteLater for the ClientConnection and sets the hold
wl_client pointer to null instead of deleting directly. So the
ClientConnection is still around while the Resources gets cleaned up.
This is similar to the cleanup of Resource where on unbind the
wl_resource pointer is set to null and the Resource gets delete later.

BUG: 370232
FIXED-IN: 5.28

Reviewers: #plasma, bshah

Subscribers: plasma-devel

Tags: #plasma_on_wayland

Differential Revision: https://phabricator.kde.org/D3004
2016-10-11 07:41:17 +02:00
src/wayland [server] Use deleteLater when a ClientConnection gets destroyed 2016-10-11 07:41:17 +02:00