Fix issues reported by a static analyzer about using g_variant_iter_free()