mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
xwayland/selection: destroy all selections on Xwayland restart
Previously, Xwayland could restart, and we'd get events for transfers pointing to the previous (now freed) xwm instance. This led to use-after-free segfaults. Closes #2565.
This commit is contained in:
parent
3417fc0cca
commit
b6ba595862
3 changed files with 28 additions and 3 deletions
|
|
@ -66,7 +66,7 @@ static struct wlr_xwm_selection_transfer *xwm_selection_transfer_get_first(
|
|||
return first;
|
||||
}
|
||||
|
||||
static void xwm_selection_transfer_destroy_outgoing(
|
||||
void xwm_selection_transfer_destroy_outgoing(
|
||||
struct wlr_xwm_selection_transfer *transfer) {
|
||||
struct wlr_xwm_selection *selection = transfer->selection;
|
||||
bool was_first = transfer == xwm_selection_transfer_get_first(selection);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue