mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 16:42:26 +00:00
backend/wayland: fix wlr_wl_pointer use-after-free
This commit is contained in:
parent
f42816ce3f
commit
933208837d
@ -331,6 +331,11 @@ struct wlr_wl_pointer *pointer_get_wl(struct wlr_pointer *wlr_pointer) {
|
|||||||
|
|
||||||
static void pointer_destroy(struct wlr_pointer *wlr_pointer) {
|
static void pointer_destroy(struct wlr_pointer *wlr_pointer) {
|
||||||
struct wlr_wl_pointer *pointer = pointer_get_wl(wlr_pointer);
|
struct wlr_wl_pointer *pointer = pointer_get_wl(wlr_pointer);
|
||||||
|
|
||||||
|
if (pointer->output->backend->current_pointer == pointer) {
|
||||||
|
pointer->output->backend->current_pointer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
wl_list_remove(&pointer->output_destroy.link);
|
wl_list_remove(&pointer->output_destroy.link);
|
||||||
free(pointer);
|
free(pointer);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user