Hi Inaky, > + > +/* > + * Destroy/release the contents of a 'struct tx_queue_entry' > + * > + * This releases resources allocated *inside* @entry and @entry > + * itself. > + */ > +static void tx_queue_entry_destroy_free(gpointer _entry, gpointer unused) Can't this be simply tx_queue_entry_free? And feel free to take struct tx_queue_entry * here. Casting the destructor in g_foo_foreach is acceptable. > +{ > + struct tx_queue_entry *entry = _entry; > + > + if (entry->destroy) > + entry->destroy(entry->data); An empty line after if/while/for blocks please. I will update the coding-style document with this rule shortly. > + g_free(entry->pdus); > + g_free(entry); > +} > + Regards, -Denis