Re: [PATCH v2 11/20] builtin/commit-graph.c: let parse-options parse subcommands

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

 



On Fri, Aug 19, 2022 at 07:53:08PM +0200, Ævar Arnfjörð Bjarmason wrote:
> > +	argc = parse_options(argc, argv, prefix, options,
> > +			     builtin_commit_graph_usage, 0);
> > +	FREE_AND_NULL(options);
> 
> Why FREE_AND_NULL() over free()?

Heh, it's interesting that you should ask that ;)

I followed the existing pattern for now, just like you did in
84e4484f12 (commit-graph: use parse_options_concat(), 2021-08-23),
where you made graph_verify() and graph_write() use FREE_AND_NULL() to
release their concatenated options arrays.

But yeah, a plain free() should work just fine in these cases.



[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