aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwm.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-06-25 11:03:07 -0400
committerGitHub <noreply@github.com>2018-06-25 11:03:07 -0400
commite51829ff7c25215cdf002f9947665b68a27a6275 (patch)
treeb9e889484beabe50022a2bd7f100786f8e228817 /xwayland/xwm.c
parent253a88f03065763f2f9238d0389da382e3e09090 (diff)
parentffd37b664f6fbb01d6be44411b3117c88ee61fe2 (diff)
Merge pull request #1084 from martinetd/use-after-free
use-after-free fixes (xdg_shell popups, primary selection source, xwm parents)
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r--xwayland/xwm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index b397b1e8..66a85d05 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -294,6 +294,12 @@ static void xwayland_surface_destroy(
wl_list_remove(&xsurface->link);
wl_list_remove(&xsurface->parent_link);
+ struct wlr_xwayland_surface *child, *next;
+ wl_list_for_each_safe(child, next, &xsurface->children, parent_link) {
+ wl_list_remove(&child->parent_link);
+ wl_list_init(&child->parent_link);
+ }
+
if (xsurface->surface_id) {
wl_list_remove(&xsurface->unpaired_link);
}