dispatcher: fix memleak in construct_device_dhcp4_items()

When iterating over a container variant, the children values
must be unrefed when no longer used.

(cherry picked from commit acd6226e8a)
This commit is contained in:
Dan Williams 2015-03-12 13:24:32 -05:00 committed by Thomas Haller
parent e7c1900b60
commit 256f11e6fc

View file

@ -210,6 +210,7 @@ construct_device_dhcp4_items (GSList *items, GVariant *dhcp4_config)
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;
}