Re: [GSoC][PATCH 1/1] rebase -i: add --ignore-whitespace flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio

On Mon, 15 Jul 2019 15:08:30 -0700 Junio C Hamano <gitster@xxxxxxxxx> 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;




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux