summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-08-12 11:22:22 +0200
committerThomas Haller <thaller@redhat.com>2015-08-12 11:22:22 +0200
commit641ca3d5d2cb7b971debfc0aa6feebc8dce09cb8 (patch)
treec2fd524b39024560717ee1fcfd967d39fb4dd1c2
parent514059aa620b34e084367a8866852b106aee0e0a (diff)
downloadNetworkManager-641ca3d5d2cb7b971debfc0aa6feebc8dce09cb8.tar.gz
dhcp/tests: fix memleaks in tests (test_vendor_option_metered)
Fixes: 1e39b2320dfe42ca33dfbf12746d63935818ac5a
-rw-r--r--src/dhcp-manager/tests/test-dhcp-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dhcp-manager/tests/test-dhcp-utils.c b/src/dhcp-manager/tests/test-dhcp-utils.c
index 0ec105257c..da6e7929e9 100644
--- a/src/dhcp-manager/tests/test-dhcp-utils.c
+++ b/src/dhcp-manager/tests/test-dhcp-utils.c
@@ -178,7 +178,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 }
@@ -189,6 +189,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);