After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640551 - LinkedHashSet in Individual leaks memory updating IM addresses
LinkedHashSet in Individual leaks memory updating IM addresses
Status: RESOLVED DUPLICATE of bug 639254
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks: 640554
 
 
Reported: 2011-01-25 17:02 UTC by Travis Reitter
Modified: 2011-01-27 20:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Travis Reitter 2011-01-25 17:02:57 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.
Comment 1 Travis Reitter 2011-01-25 17:17:35 UTC
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
Comment 2 Travis Reitter 2011-01-25 20:09:01 UTC
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).
Comment 3 Travis Reitter 2011-01-27 20:46:49 UTC

*** This bug has been marked as a duplicate of bug 639254 ***