Commit 1c5d8d0a authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

all: fix a couple more gvariant iteration leaks

parent 634888af
......@@ -313,6 +313,7 @@ construct_device_dhcp6_items (GSList *items, GVariant *dhcp6_config)
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;
}
......
......@@ -2084,8 +2084,7 @@ nm_utils_ip_routes_from_variant (GVariant *value,
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;
......@@ -2098,8 +2097,7 @@ nm_utils_ip_routes_from_variant (GVariant *value,
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);
......@@ -2113,6 +2111,8 @@ nm_utils_ip_routes_from_variant (GVariant *value,
}
g_ptr_array_add (routes, route);
next:
g_variant_unref (route_var);
}
return routes;
......
......@@ -213,6 +213,7 @@ get_managed_objects_cb (GDBusProxy *proxy,
G_VARIANT_TYPE_DICTIONARY)) {
device_added (proxy, path, self);
}
g_variant_unref (ifaces);
}
g_variant_unref (variant);
......
......@@ -930,6 +930,7 @@ set_secrets_not_required (NMConnection *connection, GVariant *dict)
g_variant_unref (val);
}
}
g_variant_unref (setting_dict);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment