Drop a few unneeded ifs

It does not hurt to pass NULL to g_list_free().
Trivial off-by-one fix

We have a tenth example.