Diff options
Diffstat (limited to 'source/ui-patch.c')
-rw-r--r--source/ui-patch.c4
1 file changed, 3 insertions, 1 deletion
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);
}