diff options
author | György Kurucz <kuruczgyurci@hotmail.com> | 2019-10-27 12:40:13 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-10-27 19:01:16 +0100 |
commit | b81bb2ef3040e5cf3dcffbddcb5389775c879d85 (patch) | |
tree | e7fa3a9750856d84bf17af031c5ff6f4f82fa123 | |
parent | 9971db02ff044da6cf105a7f1d0ede1ea740c3fd (diff) |
Fix heap-use-after-free in wlr_send_tablet_v2_tablet_pad_leave
See swaywm/sway#4660
-rw-r--r-- | types/tablet_v2/wlr_tablet_v2_pad.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/types/tablet_v2/wlr_tablet_v2_pad.c b/types/tablet_v2/wlr_tablet_v2_pad.c index 515d1fbb..fdffd475 100644 --- a/types/tablet_v2/wlr_tablet_v2_pad.c +++ b/types/tablet_v2/wlr_tablet_v2_pad.c @@ -171,6 +171,9 @@ void destroy_tablet_pad_v2(struct wl_resource *resource) { } free(pad->strips); + if (pad->pad->current_client == pad) { + pad->pad->current_client = NULL; + } free(pad); wl_resource_set_user_data(resource, NULL); } |