]> git.sur5r.net Git - i3/i3/commitdiff
Free match after criteria initialization
authorTony Crisci <tony@dubstepdish.com>
Wed, 19 Mar 2014 08:34:42 +0000 (04:34 -0400)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 21 Mar 2014 18:23:05 +0000 (19:23 +0100)
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.

src/commands.c

index c0f1d1874a00ff544436ab5b7858f1673437db15..f05d9758a9f64e348682d2fa1284da9b8a199945 100644 (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);