From: banjiuqingshan <63209634+banjiuqingshan@users.noreply.github.com> Date: Fri, 18 Nov 2022 01:37:00 +0000 (+0800) Subject: use regfree to release the memory X-Git-Tag: v3.6.2~21^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1805%2Fhead;p=thirdparty%2Flibarchive.git use regfree to release the memory use regfree() to release the memory requested by the regular expression.#1804 --- diff --git a/tar/subst.c b/tar/subst.c index 39c54acfd..55ad63dce 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);