[Libosinfo] [libosinfo PATCH] Use g_list_free_full where easily possible

Pino Toscano ptoscano at redhat.com
Thu Dec 20 11:38:40 UTC 2018


On Thursday, 20 December 2018 11:50:59 CET Fabiano Fidêncio wrote:
> On Thu, 2018-12-20 at 10:56 +0100, Pino Toscano wrote:
> > Use g_list_free_full instead of g_list_foreach + g_list_free, so the
> > lists are cleared with a single call.
> > 
> > test-isodetect gets a void* wrapper, so there is no need to add casts
> > everywhere.
> > 
> [snip]
> 
> Pino, your patch looks fine although it could also do this cleanup in a
> few other places, altogether.
> 
> Please, take a look at: 
> https://gitlab.com/fidencio/libosinfo/commit/527e51cfc6bdcc3412b574e825f4060781fef537

Oh duh -- for example, in the case of osinfo_entity_param_values_free
I did not do that because I misread osinfo_entity_param_value_free as
the "free function" referenced later on in osinfo_entity_init...
The same for all the other cases...

> If you agree with my proposed fixup, I'd squash my changes into your
> patch and have your patch merged.

Yes please, and thanks for the eye sharper than mine.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20181220/85b7078f/attachment.sig>


More information about the Libosinfo mailing list