[Bug 51842] mission-control try to access freed memory (valgrind)
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Jul 9 19:31:46 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=51842
--- Comment #2 from Xavier Claessens <xclaesse at gmail.com> 2012-07-09 10:31:46 PDT ---
I've understood how this can happen:
in mcd-account-manager-default.c::_delete_from_keyring() it does:
gchar *removed = g_strdup (account);
g_hash_table_insert (amd->removed_accounts, removed, removed);
So what happens if the account is already in the hash table? Doc says:
"""
If the key already exists in the GHashTable its current value is replaced with
the new value. If you supplied a value_destroy_func when creating the
GHashTable, the old value is freed using that function. If you supplied a
key_destroy_func when creating the GHashTable, the passed key is freed using
that function.
"""
Since @removed is passed both as value and key, it gets inserted as value but
freed as key => we get a freed string as value!!
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list