On Mon, Sep 10, 2018 at 09:55:30AM -0700, Junio C Hamano wrote: > SZEDER Gábor <szeder.dev@xxxxxxxxx> 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.