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.
next
Tony Crisci 2014-03-19 04:34:42 -04:00 committed by Michael Stapelberg
parent 85df107b0d
commit 587273505c
1 changed files with 1 additions and 0 deletions

View File

@ -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);