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 607588 - Fix leak in camel_folder_info_build()
Fix leak in camel_folder_info_build()
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-01-20 18:48 UTC by Jonathon Jongsma
Modified: 2010-01-20 21:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix leak in camel_folder_info_build() (1.44 KB, patch)
2010-01-20 18:48 UTC, Jonathon Jongsma
accepted-commit_now Details | Review

Description Jonathon Jongsma 2010-01-20 18:48:19 UTC
patch attached
Comment 1 Jonathon Jongsma 2010-01-20 18:48:21 UTC
Created attachment 151862 [details] [review]
Fix leak in camel_folder_info_build()

All of the folders were added to a hash table with a non-strduped string as a
key, but then if the parent folder was missing, we created a new folderinfo for
the parent and inserted that into the hash table with a strduped key.  So when
the hash table was destroyed, the 'fake' parent folder keys were leaked.  To fix
this, I created the hash table with g_hash_table_new_full() which would g_free()
the keys and then always strduped the key.
Comment 2 Matthew Barnes 2010-01-20 20:22:17 UTC
Good catch.  Approved.
Comment 3 Jonathon Jongsma 2010-01-20 21:58:33 UTC
Thanks.  pushed.