From 814d69e9c3f9349f211ea3ff04abb5d14c28a7ea Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:55:45 -0700 Subject: Free the revision walks' arguments and state --- source/ui-stats.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/ui-stats.c') diff --git a/source/ui-stats.c b/source/ui-stats.c index a0ad442..f3ad25e 100644 --- a/source/ui-stats.c +++ b/source/ui-stats.c @@ -212,12 +212,13 @@ static int collect_stats(const struct cgit_period *period, struct string_list *a strvec_pushl(&argv, "--", ctx.qry.path, NULL); repo_init_revisions(the_repository, &rev, NULL); rev.max_parents = 1; - setup_revisions(argv.nr, argv.v, &rev, NULL); + setup_revisions_from_strvec(&argv, &rev, NULL); // Prune the walk to the displayed window instead of traversing the // whole history and discarding older commits. The check below still // bounds the period edge exactly. rev.max_age = since; if (cgit_prepare_walk(&rev)) { + release_revisions(&rev); strvec_clear(&argv); return -1; } @@ -231,6 +232,7 @@ static int collect_stats(const struct cgit_period *period, struct string_list *a release_commit_memory(the_repository->parsed_objects, commit); commit->parents = NULL; } + release_revisions(&rev); strvec_clear(&argv); return 0; } -- cgit