]> git.ipfire.org Git - thirdparty/git.git/commitdiff
revisions API: have release_revisions() release "commits"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 13 Apr 2022 20:01:45 +0000 (22:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Apr 2022 06:56:09 +0000 (23:56 -0700)
Extend the the release_revisions() function so that it frees the
"commits" in the "struct rev_info".

We don't expect to use this "struct rev_info" again, so there's no
reason to NULL out revs->commits, as e.g. simplify_merges() and
create_boundary_commit_list() do.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c

index 472fff1e0a7174676314b2ef2ff3ff2a3e9c540a..553f7de825044a76939b2d0c84a681dabe8d0aa3 100644 (file)
@@ -2928,6 +2928,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
 
 void release_revisions(struct rev_info *revs)
 {
+       free_commit_list(revs->commits);
        object_array_clear(&revs->pending);
 }