dhcp/tests: fix memleaks in tests (test_vendor_option_metered)

Fixes: 1e39b2320d
(cherry picked from commit 641ca3d5d2)
This commit is contained in:
Thomas Haller 2015-08-12 11:22:22 +02:00
parent 8a40d75f32
commit fc22db0b85

View file

@ -179,7 +179,7 @@ static void
test_vendor_option_metered (void)
{
GHashTable *options;
NMIP4Config *ip4_config;
gs_unref_object NMIP4Config *ip4_config = NULL;
static const Option data[] = {
{ "vendor_encapsulated_options", "ANDROID_METERED" },
{ NULL, NULL }
@ -190,6 +190,7 @@ test_vendor_option_metered (void)
g_assert (ip4_config);
g_assert (nm_ip4_config_get_metered (ip4_config) == FALSE);
g_hash_table_destroy (options);
g_clear_object (&ip4_config);
options = fill_table (generic_options, NULL);
options = fill_table (data, options);