From: Tony Crisci Date: Mon, 10 Mar 2014 04:38:52 +0000 (-0400) Subject: Set con window to NULL on tree_close X-Git-Tag: 4.8~104 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=81271887e20957d3e1ef1e6f5c32b4a61dd034cf;p=i3%2Fi3 Set con window to NULL on tree_close Prevents invalid reads on the freed window struct. --- diff --git a/src/tree.c b/src/tree.c index 48ab163d..e3a54955 100644 --- a/src/tree.c +++ b/src/tree.c @@ -260,7 +260,7 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool FREE(con->window->class_class); FREE(con->window->class_instance); i3string_free(con->window->name); - free(con->window); + FREE(con->window); } Con *ws = con_get_workspace(con);