Fix memory leak: free marks when destroying containers (#2578)
This commit is contained in:
parent
90d68d7ea0
commit
2f9bb7dd5a
|
@ -329,6 +329,12 @@ bool tree_close_internal(Con *con, kill_window_t kill_window, bool dont_kill_par
|
|||
match_free(match);
|
||||
free(match);
|
||||
}
|
||||
while (!TAILQ_EMPTY(&(con->marks_head))) {
|
||||
mark_t *mark = TAILQ_FIRST(&(con->marks_head));
|
||||
TAILQ_REMOVE(&(con->marks_head), mark, marks);
|
||||
FREE(mark->name);
|
||||
FREE(mark);
|
||||
}
|
||||
free(con);
|
||||
|
||||
/* in the case of floating windows, we already focused another container
|
||||
|
|
Loading…
Reference in New Issue