Skip to content

Commit

Permalink
Merge branch 'mr/bisect-use-after-free'
Browse files Browse the repository at this point in the history
Use-after-free fix.

* mr/bisect-use-after-free:
  bisect--helper: avoid use-after-free
  • Loading branch information
gitster committed Dec 25, 2019
2 parents ba6b662 + 51a0a4e commit 4bfc9cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions builtin/bisect--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,12 @@ static int bisect_reset(const char *commit)

argv_array_pushl(&argv, "checkout", branch.buf, "--", NULL);
if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
error(_("could not check out original"
" HEAD '%s'. Try 'git bisect"
" reset <commit>'."), branch.buf);
strbuf_release(&branch);
argv_array_clear(&argv);
return error(_("could not check out original"
" HEAD '%s'. Try 'git bisect"
" reset <commit>'."), branch.buf);
return -1;
}
argv_array_clear(&argv);
}
Expand Down

0 comments on commit 4bfc9cc

Please sign in to comment.