GNOME Bugzilla – Bug 640551
LinkedHashSet in Individual leaks memory updating IM addresses
Last modified: 2011-01-27 20:46:49 UTC
In individual.vala:_update_im_addresses(), this line leaks a string: im_set.add_all (cur_addresses); The valgrind output from this during our aggregation test: ==13899== 2,218 bytes in 112 blocks are definitely lost in loss record 2,881 of 2,984 ==13899== at 0x4C244E8: malloc (vg_replace_malloc.c:236) ==13899== by 0x6D3EE24: g_malloc (gmem.c:164) ==13899== by 0x6D56B9D: g_strdup (gstrfuncs.c:102) ==13899== by 0x5F381D4: gee_linked_list_real_add (linkedlist.c:511) ==13899== by 0x5D10948: folks_linked_hash_set_real_add (linked-hash-set.c:153) ==13899== by 0x5D10895: folks_linked_hash_set_real_add_all (linked-hash-set.c:333) ==13899== by 0x5D0985A: __lambda12__gh_func (individual.c:1422) ==13899== by 0x6D264A2: g_hash_table_foreach (ghash.c:1328) ... This happens fairly often during the lifetime of a client (such as Empathy) and certainly contributes to Empathy's memory leaking when going offline and online.
This valgrind log is from our aggregation test and shows the same LinkedHashSet leak as in bug #640554: http://people.collabora.co.uk/~treitter/bugs/bgo640551/valgrind.log.13899
It was pointed out that Gee.LinkedList has been known to leak (see bug #639254). However, it seems like that may no longer apply (see bug #639254 comment #1).
*** This bug has been marked as a duplicate of bug 639254 ***