]> git.sur5r.net Git - i3/i3/commitdiff
free container matches when destroying containers
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 9 Jan 2016 13:18:16 +0000 (14:18 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 9 Jan 2016 16:06:58 +0000 (17:06 +0100)
src/tree.c

index 5a6129ac86e60f2df9107b0522656ec1d876553d..5ff426cad60b96e00ff25d2c685174e9f24443a2 100644 (file)
@@ -328,6 +328,12 @@ bool tree_close_internal(Con *con, kill_window_t kill_window, bool dont_kill_par
     free(con->name);
     FREE(con->deco_render_params);
     TAILQ_REMOVE(&all_cons, con, all_cons);
+    while (!TAILQ_EMPTY(&(con->swallow_head))) {
+        Match *match = TAILQ_FIRST(&(con->swallow_head));
+        TAILQ_REMOVE(&(con->swallow_head), match, matches);
+        match_free(match);
+        free(match);
+    }
     free(con);
 
     /* in the case of floating windows, we already focused another container