On Sun, Apr 03 2022, Phillip Wood wrote: > Hi Ævar > > On 02/04/2022 11:49, Ævar Arnfjörð Bjarmason wrote: >> +static void release_revisions_cmdline(struct rev_cmdline_info >> *cmdline) >> +{ >> + unsigned int i; >> + >> + if (!cmdline) >> + return; > > I don't think we need this guard, the only instances of struct > rev_cmdline_info exist within struct rev_info, as far as I can see it > is never created on its own. Yes, it won't ever be NULL. I'll fix that (missed it with the other NULL check cargo-culting). >> + for (i = 0; i < cmdline->nr; i++) >> + free((char *)cmdline->rev[i].name); >> + free(cmdline->rev); > > This could just be in release_revisions() Ditto <220403.86ilrqmflb.gmgdl@xxxxxxxxxxxxxxxxxxx>. I.e. I'd prefer to keep these for readability