summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2013-03-04 11:14:44 +0100
committerMartin Pitt <martinpitt@gnome.org>2013-03-04 11:14:44 +0100
commit513376b826fe027f8ae6c36e42566de2a73e4881 (patch)
tree906a399fc8a95cb956a7ad3865fda227f3673dc6
parenta49d4b3f64d5d37d3844ad0107968124c0a1d503 (diff)
downloadgobject-introspection-513376b826fe027f8ae6c36e42566de2a73e4881.tar.gz
tests: Fix memory leak in gi_marshalling_tests_ghashtable_utf8_full_return
For the "transfer full" case we need to supply free functions for the created hash table in gi_marshalling_tests_ghashtable_utf8_full_return().
-rw-r--r--tests/gimarshallingtests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index dc7fabd6..f6fd630a 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -2933,7 +2933,7 @@ gi_marshalling_tests_ghashtable_utf8_full_return (void)
{
GHashTable *hash_table = NULL;
- 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"));