summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-06-23 16:28:55 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-06-23 16:28:55 +0000
commit58f83683e9ccd9e9e0781105ed1e676f7c2241e0 (patch)
tree1e01f181d09e3313a97bc5ebbbd1834dc6659ce4 /tests
parentf3a61fe4a04b105c4ddf24f09f8f028daefaf7fe (diff)
Don't leak memory here.
2005-06-23 Matthias Clasen <mclasen@redhat.com> * tests/keyfile-test.c (test_group_remove): Don't leak memory here. * glib/gkeyfile.c (g_key_file_load_from_data_dirs): Don't leak output_path. (#308546, Kjartan Maraas)
Diffstat (limited to 'tests')
-rw-r--r--tests/keyfile-test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/keyfile-test.c b/tests/keyfile-test.c
index 6680648b7..1df71d3a9 100644
--- a/tests/keyfile-test.c
+++ b/tests/keyfile-test.c
@@ -708,6 +708,8 @@ test_group_remove (void)
g_key_file_remove_group (keyfile, "group1", &error);
check_no_error (&error);
+ g_strfreev (names);
+
names = g_key_file_get_groups (keyfile, &len);
if (names == NULL)
{
@@ -722,6 +724,8 @@ test_group_remove (void)
g_key_file_remove_group (keyfile, "group2", &error);
check_no_error (&error);
+ g_strfreev (names);
+
names = g_key_file_get_groups (keyfile, &len);
if (names == NULL)
{
@@ -735,6 +739,8 @@ test_group_remove (void)
g_key_file_remove_group (keyfile, "no such group", &error);
check_error (&error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND);
+ g_strfreev (names);
+
g_key_file_free (keyfile);
}