1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 16:16:09 +02:00

Merge branch 'mr/bisect-use-after-free'

Use-after-free fix.

* mr/bisect-use-after-free:
  bisect--helper: avoid use-after-free
This commit is contained in:
Junio C Hamano 2019-12-25 11:21:59 -08:00
commit 4bfc9ccfb6

View File

@ -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);
}