mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 10:08:38 +02:00
ibft/tests: fix memleaks in test code for valgrind
This commit is contained in:
parent
9a2f2ed7fd
commit
fbe8c0ed87
1 changed files with 3 additions and 2 deletions
|
|
@ -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 ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue