From: Michael Stapelberg Date: Sat, 9 Jan 2016 13:18:16 +0000 (+0100) Subject: free container matches when destroying containers X-Git-Tag: 4.12~46 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=436e4c17b30ab36535d0bb02f25906a8d8f3954e;p=i3%2Fi3 free container matches when destroying containers --- diff --git a/src/tree.c b/src/tree.c index 5a6129ac..5ff426ca 100644 --- a/src/tree.c +++ b/src/tree.c @@ -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