diff options
author | Thomas Haller <thaller@redhat.com> | 2015-02-07 16:02:36 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-02-09 11:51:07 +0100 |
commit | fbe8c0ed87a83e66f27df3cce7110ba23b80875e (patch) | |
tree | 10e20d6885a1bf84e61fadc4f1a6c7b0df9bbe23 | |
parent | 9a2f2ed7fdd44e670210adffc4ffde6aa5089309 (diff) | |
download | NetworkManager-fbe8c0ed87a83e66f27df3cce7110ba23b80875e.tar.gz |
ibft/tests: fix memleaks in test code for valgrind
-rw-r--r-- | src/settings/plugins/ibft/tests/test-ibft.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/settings/plugins/ibft/tests/test-ibft.c b/src/settings/plugins/ibft/tests/test-ibft.c index 2ff249af34..d5da9ec022 100644 --- a/src/settings/plugins/ibft/tests/test-ibft.c +++ b/src/settings/plugins/ibft/tests/test-ibft.c @@ -63,7 +63,7 @@ read_block (const char *iscsiadm_path, const char *expected_mac) } g_assert (block); - g_slist_foreach (blocks, (GFunc) g_ptr_array_unref, NULL); + g_slist_free_full (blocks, (GDestroyNotify) g_ptr_array_unref); return block; } @@ -110,6 +110,7 @@ test_read_ibft_dhcp (void) g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ==, NM_SETTING_IP4_CONFIG_METHOD_AUTO); g_object_unref (connection); + g_ptr_array_unref (block); } static void @@ -266,7 +267,7 @@ test_read_ibft_vlan (void) g_assert_cmpstr (nm_setting_ip_config_get_gateway (s_ip4), ==, NULL); g_object_unref (connection); - g_ptr_array_ref (block); + g_ptr_array_unref (block); } NMTST_DEFINE (); |