Skip to content

Commit 3ae0094

Browse files
committed
Merge branch 'rs/bisect-start-leakfix' into maint-2.38
Code clean-up that results in plugging a leak. * rs/bisect-start-leakfix: bisect--helper: plug strvec leak
2 parents 1155c8e + 246526d commit 3ae0094

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

builtin/bisect--helper.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,11 +765,10 @@ static enum bisect_error bisect_start(struct bisect_terms *terms, const char **a
765765
strbuf_read_file(&start_head, git_path_bisect_start(), 0);
766766
strbuf_trim(&start_head);
767767
if (!no_checkout) {
768-
struct strvec argv = STRVEC_INIT;
768+
const char *argv[] = { "checkout", start_head.buf,
769+
"--", NULL };
769770

770-
strvec_pushl(&argv, "checkout", start_head.buf,
771-
"--", NULL);
772-
if (run_command_v_opt(argv.v, RUN_GIT_CMD)) {
771+
if (run_command_v_opt(argv, RUN_GIT_CMD)) {
773772
res = error(_("checking out '%s' failed."
774773
" Try 'git bisect start "
775774
"<valid-branch>'."),

0 commit comments

Comments
 (0)