all: fix a couple more gvariant iteration leaks
This commit is contained in:
@@ -313,6 +313,7 @@ construct_device_dhcp6_items (GSList *items, GVariant *dhcp6_config)
|
|||||||
tmp = g_variant_get_string (val, NULL);
|
tmp = g_variant_get_string (val, NULL);
|
||||||
items = g_slist_prepend (items, g_strdup_printf ("DHCP6_%s=%s", ucased, tmp));
|
items = g_slist_prepend (items, g_strdup_printf ("DHCP6_%s=%s", ucased, tmp));
|
||||||
g_free (ucased);
|
g_free (ucased);
|
||||||
|
g_variant_unref (val);
|
||||||
}
|
}
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
@@ -2084,8 +2084,7 @@ nm_utils_ip_routes_from_variant (GVariant *value,
|
|||||||
if ( !g_variant_lookup (route_var, "dest", "&s", &dest)
|
if ( !g_variant_lookup (route_var, "dest", "&s", &dest)
|
||||||
|| !g_variant_lookup (route_var, "prefix", "u", &prefix)) {
|
|| !g_variant_lookup (route_var, "prefix", "u", &prefix)) {
|
||||||
g_warning ("Ignoring invalid address");
|
g_warning ("Ignoring invalid address");
|
||||||
g_variant_unref (route_var);
|
goto next;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
if (!g_variant_lookup (route_var, "next-hop", "&s", &next_hop))
|
if (!g_variant_lookup (route_var, "next-hop", "&s", &next_hop))
|
||||||
next_hop = NULL;
|
next_hop = NULL;
|
||||||
@@ -2098,8 +2097,7 @@ nm_utils_ip_routes_from_variant (GVariant *value,
|
|||||||
if (!route) {
|
if (!route) {
|
||||||
g_warning ("Ignoring invalid route: %s", error->message);
|
g_warning ("Ignoring invalid route: %s", error->message);
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
g_variant_unref (route_var);
|
goto next;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_variant_iter_init (&attrs_iter, route_var);
|
g_variant_iter_init (&attrs_iter, route_var);
|
||||||
@@ -2113,6 +2111,8 @@ nm_utils_ip_routes_from_variant (GVariant *value,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_ptr_array_add (routes, route);
|
g_ptr_array_add (routes, route);
|
||||||
|
next:
|
||||||
|
g_variant_unref (route_var);
|
||||||
}
|
}
|
||||||
|
|
||||||
return routes;
|
return routes;
|
||||||
|
@@ -213,6 +213,7 @@ get_managed_objects_cb (GDBusProxy *proxy,
|
|||||||
G_VARIANT_TYPE_DICTIONARY)) {
|
G_VARIANT_TYPE_DICTIONARY)) {
|
||||||
device_added (proxy, path, self);
|
device_added (proxy, path, self);
|
||||||
}
|
}
|
||||||
|
g_variant_unref (ifaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_variant_unref (variant);
|
g_variant_unref (variant);
|
||||||
|
@@ -930,6 +930,7 @@ set_secrets_not_required (NMConnection *connection, GVariant *dict)
|
|||||||
g_variant_unref (val);
|
g_variant_unref (val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
g_variant_unref (setting_dict);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user