summaryrefslogtreecommitdiff
path: root/libsecret
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-10-17 23:17:02 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-10-19 12:09:50 +0200
commitb8bd3d0de87a37d9329850c64cac19e2ca654c37 (patch)
tree294694c948fb2e2e998afb0979288ea5c08520c0 /libsecret
parentec33acd46e42ca8c02b788bd1bd0c3377c58b8ee (diff)
downloadlibsecret-b8bd3d0de87a37d9329850c64cac19e2ca654c37.tar.gz
secret-sync: Fix SecretSync leak
The memory allocated for the SecretSync instance itself was not freed. This fixes: ==7106== 24 bytes in 1 blocks are definitely lost in loss record 855 of 1,629 ==7106== at 0x4C2A9C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7106== by 0x600303F: g_malloc0 (gmem.c:124) ==7106== by 0x6003322: g_malloc0_n (gmem.c:354) ==7106== by 0x4E6979D: _secret_sync_new (secret-util.c:441) ==7106== by 0x4E65D11: secret_service_read_alias_dbus_path_sync (secret-paths.c:2334) ==7106== by 0x4E4E09E: secret_collection_for_alias_sync (secret-collection.c:2221) ==7106== by 0x40270E: test_for_alias_sync (test-collection.c:187) ==7106== by 0x60258FA: test_case_run (gtestutils.c:2158) ==7106== by 0x6025CBB: g_test_run_suite_internal (gtestutils.c:2241) ==7106== by 0x6025D64: g_test_run_suite_internal (gtestutils.c:2253) ==7106== by 0x6025F7B: g_test_run_suite (gtestutils.c:2328) ==7106== by 0x6024C1C: g_test_run (gtestutils.c:1596) ==7106== by 0x4E7CA3B: egg_tests_run_with_loop (egg-testing.c:167) ==7106== by 0x406948: main (test-collection.c:1033) https://bugzilla.gnome.org/show_bug.cgi?id=756766
Diffstat (limited to 'libsecret')
-rw-r--r--libsecret/secret-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libsecret/secret-util.c b/libsecret/secret-util.c
index 67ac081..ba5ac1e 100644
--- a/libsecret/secret-util.c
+++ b/libsecret/secret-util.c
@@ -453,6 +453,7 @@ _secret_sync_free (gpointer data)
g_clear_object (&sync->result);
g_main_loop_unref (sync->loop);
g_main_context_unref (sync->context);
+ g_free (sync);
}
void