Again, g_slist_free_full() can be used and the previous loop can be removed.