From: Tony Crisci Date: Wed, 19 Mar 2014 08:34:42 +0000 (-0400) Subject: Free match after criteria initialization X-Git-Tag: 4.8~94 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=587273505c667b8955b207178c591755fdc9d5d5;p=i3%2Fi3 Free match after criteria initialization This memory leak is associated with matching by a criteria that uses a regular expression. Without freeing a regex before calling match_init, it will definitely be lost. --- diff --git a/src/commands.c b/src/commands.c index c0f1d187..f05d9758 100644 --- a/src/commands.c +++ b/src/commands.c @@ -257,6 +257,7 @@ void cmd_criteria_init(I3_CMD) { owindow *ow; DLOG("Initializing criteria, current_match = %p\n", current_match); + match_free(current_match); match_init(current_match); while (!TAILQ_EMPTY(&owindows)) { ow = TAILQ_FIRST(&owindows);