summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2013-03-04 11:17:59 +0100
committerMartin Pitt <martinpitt@gnome.org>2013-03-04 11:17:59 +0100
commit3ff297fa04adf585ebf8c9d5593b71640649d9d1 (patch)
treeadc09465dea5f336832f977ff4c2618c8804cf50
parent513376b826fe027f8ae6c36e42566de2a73e4881 (diff)
downloadgobject-introspection-3ff297fa04adf585ebf8c9d5593b71640649d9d1.tar.gz
tests: Fix memory leak in gi_marshalling_tests_ghashtable_utf8_container_out
Similarly to the previous commit, we need to provide free functions for (transfer full) returned hash tables.
-rw-r--r--tests/gimarshallingtests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index f6fd630a..4931778d 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -3010,7 +3010,7 @@ gi_marshalling_tests_ghashtable_utf8_container_out (GHashTable **hash_table)
void
gi_marshalling_tests_ghashtable_utf8_full_out (GHashTable **hash_table)
{
- *hash_table = g_hash_table_new (g_str_hash, g_str_equal);
+ *hash_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
g_hash_table_insert (*hash_table, g_strdup ("-1"), g_strdup ("1"));
g_hash_table_insert (*hash_table, g_strdup ("0"), g_strdup ("0"));
g_hash_table_insert (*hash_table, g_strdup ("1"), g_strdup ("-1"));