summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-02-07 15:25:47 +0100
committerThomas Haller <thaller@redhat.com>2015-02-09 11:51:07 +0100
commit9a2f2ed7fdd44e670210adffc4ffde6aa5089309 (patch)
tree052a4f16fe5bad07358c354e37a4dc46205a365c
parent1ba16f44cfcab869ea1b8d6beb707de7794c5fb6 (diff)
downloadNetworkManager-9a2f2ed7fdd44e670210adffc4ffde6aa5089309.tar.gz
keyfile/tests: fix memleaks in test code for valgrind
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index 51f9e2c882..28ab20c681 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -1515,6 +1515,7 @@ test_write_intlike_ssid (void)
g_assert_no_error (error);
g_assert (tmp);
g_assert_cmpstr (tmp, ==, "101");
+ g_free (tmp);
g_key_file_free (keyfile);
@@ -1601,6 +1602,7 @@ test_write_intlike_ssid_2 (void)
g_assert_no_error (error);
g_assert (tmp);
g_assert_cmpstr (tmp, ==, "11\\;12\\;13\\;");
+ g_free (tmp);
g_key_file_free (keyfile);
@@ -2511,6 +2513,7 @@ test_write_wired_8021x_tls_connection_path (void)
tmp2 = g_path_get_dirname (testfile);
if (g_strcmp0 (tmp2, TEST_KEYFILES_DIR) == 0)
relative = TRUE;
+ g_free (tmp2);
/* CA cert */
tmp = g_key_file_get_string (keyfile,
@@ -3098,6 +3101,7 @@ test_write_new_wired_group_name (void)
unlink (testfile);
g_free (testfile);
+ g_key_file_unref (kf);
g_object_unref (reread);
g_object_unref (connection);
}
@@ -3236,6 +3240,7 @@ test_write_new_wireless_group_names (void)
unlink (testfile);
g_free (testfile);
+ g_key_file_unref (kf);
g_object_unref (reread);
g_object_unref (connection);
}