From: SZEDER Gábor Date: Mon, 10 Sep 2018 20:25:27 GMT Subject: Re: [PATCH v2 10/11] builtin rebase: only store fully-qualified refs in `options.head_name` Message-ID: <20180910202527.GC17224@localhost> In-Reply-To: On Mon, Sep 10, 2018 at 09:55:30AM -0700, Junio C Hamano wrote: > SZEDER Gábor writes: > > >> } else { > >> - options.head_name = xstrdup("detached HEAD"); > >> + free(options.head_name); > >> + options.head_name = NULL; > > > > Please use FREE_AND_NULL(options.head_name) here. > > Good; did contrib/coccinelle/free.cocci catch this? Yes. But now that you mention it, I see that it didn't catch it in 'pu' or in most of the later 'pk/rebase-in-c-X-...' branches, even though they all have these lines. It bisects to 0073df2bd3 (builtin rebase: support --rebase-merges[=[no-]rebase-cousins], 2018-09-04), which doesn't touch these lines at all. Strange; I have no idea what's going on.