]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
use regfree to release the memory 1805/head
authorbanjiuqingshan <63209634+banjiuqingshan@users.noreply.github.com>
Fri, 18 Nov 2022 01:37:00 +0000 (09:37 +0800)
committerGitHub <noreply@github.com>
Fri, 18 Nov 2022 01:37:00 +0000 (09:37 +0800)
use regfree() to release the memory requested by the regular expression.#1804

tar/subst.c

index 39c54acfd14f070eb886a01d081550570d7fe066..55ad63dcecdebed66aec3e140d1544adc3be2e51 100644 (file)
@@ -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);