Fix memory leak

This commit is contained in:
Bruce Hill 2021-08-02 12:55:14 -07:00
parent 1eab8af155
commit 3d0c07a0b8

View File

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