[libsecret] test-item: Fix GHashTable leak
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsecret] test-item: Fix GHashTable leak
- Date: Mon, 19 Oct 2015 13:14:34 +0000 (UTC)
commit 66888a1e6aacb8fdb2ffd7d119541a32987505a9
Author: Christophe Fergeau <cfergeau redhat com>
Date: Sat Oct 17 22:09:07 2015 +0200
test-item: Fix GHashTable leak
This fixes:
==16901== 248 (88 direct, 160 indirect) bytes in 1 blocks are definitely lost in loss record 1,108 of
1,154
==16901== at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16901== by 0x36E564F679: g_malloc (gmem.c:97)
==16901== by 0x36E5666CD2: g_slice_alloc (gslice.c:1007)
==16901== by 0x36E563860D: g_hash_table_new_full (ghash.c:711)
==16901== by 0x4047B2: test_set_attributes_async (test-item.c:493)
==16901== by 0x36E566FB92: test_case_run (gtestutils.c:2124)
==16901== by 0x36E566FB92: g_test_run_suite_internal (gtestutils.c:2185)
==16901== by 0x36E566FD5A: g_test_run_suite_internal (gtestutils.c:2196)
==16901== by 0x36E56700DA: g_test_run_suite (gtestutils.c:2249)
==16901== by 0x36E5670110: g_test_run (gtestutils.c:1553)
==16901== by 0x4C5A0EA: egg_tests_run_with_loop (egg-testing.c:167)
==16901== by 0x406AAE: main (test-item.c:880)
https://bugzilla.gnome.org/show_bug.cgi?id=756766
libsecret/test-item.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libsecret/test-item.c b/libsecret/test-item.c
index 8c3ef27..2221d8b 100644
--- a/libsecret/test-item.c
+++ b/libsecret/test-item.c
@@ -497,6 +497,7 @@ test_set_attributes_async (Test *test,
g_hash_table_insert (attributes, "number", "5");
secret_item_set_attributes (item, &MOCK_SCHEMA, attributes, NULL, on_async_result, &result);
g_assert (result == NULL);
+ g_hash_table_unref (attributes);
egg_test_wait ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]