Hi Junio
On Mon, 15 Jul 2019 15:08:30 -0700 Junio C Hamano <[email protected]> wrote:
>
> Doesn't it also come from handling OPT_STRING() via parse_options(),
> which gives a pointer from argv[], freeing something that is not
> allocated in the first place?
Ah! The path from cmd_rebase__interactive! A simple workaround could be:
diff --git a/builtin/rebase.c b/builtin/rebase.c
index c55957c31f..afe376c3fe 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -525,6 +525,8 @@ int cmd_rebase__interactive(int argc, const char **argv,
const char *prefix)
argc = parse_options(argc, argv, NULL, options,
builtin_rebase_interactive_usage, PARSE_OPT_KEEP_ARGV0);
+ opts.strategy_opts = xstrdup_or_null(opts.strategy_opts);
+
if (!is_null_oid(&squash_onto))
opts.squash_onto = &squash_onto;