From 72cf6b7f0641245fde9aa4a2a786ca27de41c1ba Mon Sep 17 00:00:00 2001 From: banjiuqingshan <63209634+banjiuqingshan@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:37:00 +0800 Subject: use regfree to release the memory use regfree() to release the memory requested by the regular expression.#1804 --- tar/subst.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tar/subst.c') diff --git a/tar/subst.c b/tar/subst.c index 39c54acf..55ad63dc 100644 --- a/tar/subst.c +++ b/tar/subst.c @@ -320,6 +320,7 @@ cleanup_substitution(struct bsdtar *bsdtar) while ((rule = subst->first_rule) != NULL) { subst->first_rule = rule->next; free(rule->result); + regfree(&rule->re); free(rule); } free(subst); -- cgit v1.2.1