Free match after criteria initialization
Patch status: merged
Patch by Tony Crisci
Long description:
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.
To apply this patch, use:
curl http://cr.i3wm.org/patch/481/raw.patch | git am
b/src/commands.c
16 |
@@ -257,6 +257,7 @@ void cmd_criteria_init(I3_CMD) { |
17 |
owindow *ow; |
18 |
|
19 |
DLOG("Initializing criteria, current_match = %p\n", current_match); |
20 |
+ match_free(current_match); |
21 |
match_init(current_match); |
22 |
while (!TAILQ_EMPTY(&owindows)) { |
23 |
ow = TAILQ_FIRST(&owindows); |