Skip to content

Commit

Permalink
Merge branch 'rs/bisect-start-leakfix' into maint-2.38
Browse files Browse the repository at this point in the history
Code clean-up that results in plugging a leak.

* rs/bisect-start-leakfix:
  bisect--helper: plug strvec leak
  • Loading branch information
gitster committed Oct 26, 2022
2 parents 1155c8e + 246526d commit 3ae0094
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions builtin/bisect--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,11 +765,10 @@ static enum bisect_error bisect_start(struct bisect_terms *terms, const char **a
strbuf_read_file(&start_head, git_path_bisect_start(), 0);
strbuf_trim(&start_head);
if (!no_checkout) {
struct strvec argv = STRVEC_INIT;
const char *argv[] = { "checkout", start_head.buf,
"--", NULL };

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

0 comments on commit 3ae0094

Please sign in to comment.