aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-09 12:03:32 -0400
committerDrew DeVault <sir@cmpwn.com>2017-10-09 12:03:32 -0400
commitec73c19121c5edf1176578c6b65c9d1bbfa721e0 (patch)
tree44898e630810c6def78ee408f5c1001744c1007f
parent6271abd644da15070d29d2d06bc527f89a799375 (diff)
downloadsway-ec73c19121c5edf1176578c6b65c9d1bbfa721e0.zip
sway-ec73c19121c5edf1176578c6b65c9d1bbfa721e0.tar.gz
sway-ec73c19121c5edf1176578c6b65c9d1bbfa721e0.tar.bz2
Fix use-after free introduced by cbe7364
-rw-r--r--sway/container.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c
index 718608f..829fde6 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -516,10 +516,10 @@ swayc_t *destroy_view(swayc_t *view) {
return NULL;
}
sway_log(L_DEBUG, "Destroying view '%p'", view);
+ swayc_t *parent = view->parent;
free_swayc(view);
// Destroy empty containers
- swayc_t *parent = view->parent;
if (parent && parent->type == C_CONTAINER) {
return destroy_container(parent);
}