tmp = g_variant_get_string (val, NULL);
items = g_slist_prepend (items, g_strdup_printf ("DHCP6_%s=%s", ucased, tmp));
g_free (ucased);
+ g_variant_unref (val);
}
return items;
}
if ( !g_variant_lookup (route_var, "dest", "&s", &dest)
|| !g_variant_lookup (route_var, "prefix", "u", &prefix)) {
g_warning ("Ignoring invalid address");
- g_variant_unref (route_var);
- continue;
+ goto next;
}
if (!g_variant_lookup (route_var, "next-hop", "&s", &next_hop))
next_hop = NULL;
if (!route) {
g_warning ("Ignoring invalid route: %s", error->message);
g_clear_error (&error);
- g_variant_unref (route_var);
- continue;
+ goto next;
}
g_variant_iter_init (&attrs_iter, route_var);
}
g_ptr_array_add (routes, route);
+next:
+ g_variant_unref (route_var);
}
return routes;
G_VARIANT_TYPE_DICTIONARY)) {
device_added (proxy, path, self);
}
+ g_variant_unref (ifaces);
}
g_variant_unref (variant);