mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-14 15:28:06 +02:00
dispatcher: fix leak in construct_device_dhcp4_items()
Fixes: c86d0b4722
This commit is contained in:
parent
c86d0b4722
commit
641c111277
1 changed files with 10 additions and 10 deletions
|
|
@ -265,11 +265,11 @@ construct_device_dhcp4_items (GSList *items, GVariant *dhcp4_config)
|
|||
g_variant_iter_init (&iter, dhcp4_config);
|
||||
while (g_variant_iter_next (&iter, "{&sv}", &key, &val)) {
|
||||
ucased = _validate_var_name (key);
|
||||
if (!ucased)
|
||||
continue;
|
||||
tmp = g_variant_get_string (val, NULL);
|
||||
items = g_slist_prepend (items, g_strdup_printf ("DHCP4_%s=%s", ucased, tmp));
|
||||
g_free (ucased);
|
||||
if (ucased) {
|
||||
tmp = g_variant_get_string (val, NULL);
|
||||
items = g_slist_prepend (items, g_strdup_printf ("DHCP4_%s=%s", ucased, tmp));
|
||||
g_free (ucased);
|
||||
}
|
||||
g_variant_unref (val);
|
||||
}
|
||||
return items;
|
||||
|
|
@ -372,11 +372,11 @@ construct_device_dhcp6_items (GSList *items, GVariant *dhcp6_config)
|
|||
g_variant_iter_init (&iter, dhcp6_config);
|
||||
while (g_variant_iter_next (&iter, "{&sv}", &key, &val)) {
|
||||
ucased = _validate_var_name (key);
|
||||
if (!ucased)
|
||||
continue;
|
||||
tmp = g_variant_get_string (val, NULL);
|
||||
items = g_slist_prepend (items, g_strdup_printf ("DHCP6_%s=%s", ucased, tmp));
|
||||
g_free (ucased);
|
||||
if (ucased) {
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue