The key returned by g_variant_iter_next() should be freed as well. Also, clean up the coding style a bit.