]> git.sur5r.net Git - i3/i3/commitdiff
Set con window to NULL on tree_close
authorTony Crisci <tony@dubstepdish.com>
Mon, 10 Mar 2014 04:38:52 +0000 (00:38 -0400)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 10 Mar 2014 07:39:56 +0000 (08:39 +0100)
Prevents invalid reads on the freed window struct.

src/tree.c

index 48ab163da596c94b1811c6082e61adb6b5bbda37..e3a54955576bb648c5b782ec36e20b190468e824 100644 (file)
@@ -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);