aboutsummaryrefslogtreecommitdiffstats
path: root/bisect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-09-22 11:54:30 -0700
committerJunio C Hamano <gitster@pobox.com>2025-09-22 11:54:30 -0700
commitb178f27e6ddfa8d515dcd445b6bf17119f962c44 (patch)
treeadd91f18da6f021225dea7166681453879df91ed /bisect.c
parentMerge branch 'pw/rebase-i-cleanup-fix' into next (diff)
parentrevision: retain argv NULL invariant in setup_revisions() (diff)
downloadgit-b178f27e6ddfa8d515dcd445b6bf17119f962c44.tar.gz
git-b178f27e6ddfa8d515dcd445b6bf17119f962c44.zip
Merge branch 'jk/setup-revisions-freefix' into next
There are double frees and leaks around setup_revisions() API used in "git stash show", which has been fixed, and setup_revisions() API gained a wrapper to make it more ergonomic when using it with strvec-manged argc/argv pairs. * jk/setup-revisions-freefix: revision: retain argv NULL invariant in setup_revisions() treewide: pass strvecs around for setup_revisions_from_strvec() treewide: use setup_revisions_from_strvec() when we have a strvec revision: add wrapper to setup_revisions() from a strvec revision: manage memory ownership of argv in setup_revisions() stash: tell setup_revisions() to free our allocated strings
Diffstat (limited to 'bisect.c')
-rw-r--r--bisect.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/bisect.c b/bisect.c
index f24474542e..a6dc76b15c 100644
--- a/bisect.c
+++ b/bisect.c
@@ -674,9 +674,6 @@ static void bisect_rev_setup(struct repository *r, struct rev_info *revs,
const char *bad_format, const char *good_format,
int read_paths)
{
- struct setup_revision_opt opt = {
- .free_removed_argv_elements = 1,
- };
int i;
repo_init_revisions(r, revs, prefix);
@@ -693,7 +690,7 @@ static void bisect_rev_setup(struct repository *r, struct rev_info *revs,
if (read_paths)
read_bisect_paths(rev_argv);
- setup_revisions(rev_argv->nr, rev_argv->v, revs, &opt);
+ setup_revisions_from_strvec(rev_argv, revs, NULL);
}
static void bisect_common(struct rev_info *revs)