From: Orestis Floros Date: Sun, 25 Mar 2018 17:48:20 +0000 (+0300) Subject: con_toggle_layout: free(tm_dup) outside loop X-Git-Tag: 4.16~115^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b0997234ab9b49c43aca5dcd3d15abda88de9877;p=i3%2Fi3 con_toggle_layout: free(tm_dup) outside loop --- diff --git a/src/con.c b/src/con.c index 480b9e9e..8953f0ed 100644 --- a/src/con.c +++ b/src/con.c @@ -1917,7 +1917,6 @@ void con_toggle_layout(Con *con, const char *toggle_mode) { * now let's activate the current layout (next in list) */ if (current_layout_found) { new_layout = layout; - free(tm_dup); break; } @@ -1925,6 +1924,7 @@ void con_toggle_layout(Con *con, const char *toggle_mode) { current_layout_found = true; } } + free(tm_dup); if (new_layout != L_DEFAULT) { con_set_layout(con, new_layout);