Rubén Justo <rjusto@xxxxxxxxx> writes: > It does not have to be like that. We may no longer need the current > and problematic git_config_pathname(). However I did not want to go > that far in this series. True, but that one and only true interface we will end up with MUST NOT be strbuf based one, and that is why I said the patch as posted will not take us into a better future. And as a stop-gap measure, ... >> - if (!strcmp(var, "core.excludesfile")) >> + if (!strcmp(var, "core.excludesfile")) { >> + free((char *)excludes_file); > > Aaah, you prefer this :-( ... this free is what I was referring to, in > the message you are replying to, as the simpler fix ... ... obviously this would be much more preferrable. And when the one and only true interface comes, we only need to drop the cast from around here. Thanks.