aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-10-09 12:03:32 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-10-09 12:03:32 -0400
commitec73c19121c5edf1176578c6b65c9d1bbfa721e0 (patch)
tree44898e630810c6def78ee408f5c1001744c1007f
parentFix #1291 (diff)
downloadsway-ec73c19121c5edf1176578c6b65c9d1bbfa721e0.tar.gz
sway-ec73c19121c5edf1176578c6b65c9d1bbfa721e0.tar.zst
sway-ec73c19121c5edf1176578c6b65c9d1bbfa721e0.zip
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 718608ff..829fde69 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -516,10 +516,10 @@ swayc_t *destroy_view(swayc_t *view) {
516 return NULL; 516 return NULL;
517 } 517 }
518 sway_log(L_DEBUG, "Destroying view '%p'", view); 518 sway_log(L_DEBUG, "Destroying view '%p'", view);
519 swayc_t *parent = view->parent;
519 free_swayc(view); 520 free_swayc(view);
520 521
521 // Destroy empty containers 522 // Destroy empty containers
522 swayc_t *parent = view->parent;
523 if (parent && parent->type == C_CONTAINER) { 523 if (parent && parent->type == C_CONTAINER) {
524 return destroy_container(parent); 524 return destroy_container(parent);
525 } 525 }