Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-25 22:21:59 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-25 22:21:59 +0300
commit4bfc9ccfb6917805a4e1605bad359270172d145b (patch)
treef7c534eac052dcde030612699926707b75d74a1c /builtin/bisect--helper.c
parentba6b66281ebc8d863c2b0fb27ede640e4f212dd9 (diff)
parent51a0a4ed9597e949930d92be59f42f991bc40a7c (diff)
Merge branch 'mr/bisect-use-after-free'
Use-after-free fix. * mr/bisect-use-after-free: bisect--helper: avoid use-after-free
Diffstat (limited to 'builtin/bisect--helper.c')
-rw-r--r--builtin/bisect--helper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 1fbe156e67a..3055b2bb50e 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -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);
}