On Mon, Jan 09, 2023 at 01:29:37PM +0200, Andy Shevchenko wrote: > On Fri, Jan 06, 2023 at 12:51:29PM +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> ... > > GPIOD_API void gpiod_line_config_free(struct gpiod_line_config *config) > > { > > + if (!config) > > + return; > > + > > free_refs(config); > > free(config); > > } > > At least this is redundant. free() is NULL-aware itself. And if free_refs() is not, it's better to make it explicit or fix that function if possible. -- With Best Regards, Andy Shevchenko