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-patch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/ui-patch.c') diff --git a/source/ui-patch.c b/source/ui-patch.c index 0d29e38..3c76255 100644 --- a/source/ui-patch.c +++ b/source/ui-patch.c @@ -66,7 +66,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref // process. if (prefix) rev.diffopt.stat_sep = xstrfmt("(limited to '%s')\n\n", prefix); - setup_revisions(rev_argv.nr, rev_argv.v, &rev, NULL); + setup_revisions_from_strvec(&rev_argv, &rev, NULL); // A single commit resolves to a range starting at its parent, so this // only ever cuts an explicit range short and keeps one request from // emitting a patch for the whole history. @@ -74,6 +74,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref rev.max_count = ctx.cfg.max_patch_count; // The headers wait until the walk has started. if (cgit_prepare_walk(&rev)) { + release_revisions(&rev); strvec_clear(&rev_argv); return; } @@ -97,5 +98,6 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref else printf("-- \ncgit\n\n"); } + release_revisions(&rev); strvec_clear(&rev_argv); } -- cgit