revisions API users: add straightforward release_revisions()

Add a release_revisions() to various users of "struct rev_list" in
those straightforward cases where we only need to add the
release_revisions() call to the end of a block, and don't need to
e.g. refactor anything to use a "goto cleanup" pattern.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2022-04-13 22:01:36 +02:00
committed by Junio C Hamano
parent 1878b5edc0
commit 2108fe4a19
28 changed files with 39 additions and 0 deletions

View File

@ -1123,6 +1123,7 @@ static const char *find_author_by_nickname(const char *name)
strbuf_release(&buf);
format_commit_message(commit, "%aN <%aE>", &buf, &ctx);
clear_mailmap(&mailmap);
release_revisions(&revs);
return strbuf_detach(&buf, NULL);
}
die(_("--author '%s' is not 'Name <email>' and matches no existing author"), name);