aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-02 12:55:14 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-02 12:55:14 -0700
commit3d0c07a0b892c6d5400e52c427c215859f78fe29 (patch)
tree3279e2442dd43b3c97c168153f2c471845c89899 /match.c
parent1eab8af155fe6037dc81d654e20b1ac19487d502 (diff)
Fix memory leak
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index bfb860c..5411c4a 100644
--- a/match.c
+++ b/match.c
@@ -453,7 +453,7 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool
return NULL;
}
cache_destroy(&slice);
- return new_match(defs, pat, m1->start, m1->end, (pat->type == BP_MATCH) ? MATCHES(m2) : NULL);
+ return new_match(defs, pat, m1->start, m1->end, (pat->type == BP_MATCH) ? MATCHES(m1, m2) : NULL);
}
case BP_REPLACE: {
match_t *p = NULL;