GNOME Bugzilla – Bug 509270
Memory leak in CamelMultipart
Last modified: 2008-01-14 15:17:48 UTC
Will attach a patch
Created attachment 102784 [details] [review] Strange that this one was never detected before ...
Created attachment 102785 [details] [review] Two small fixes
Looks right. Couple notes: 1) The test for NULL is unnecessary since NULL is a valid GList. g_list_free() is designed to handle it. 2) Minor simplification, unrelated to the memory-leak. You could get rid of the unref_part() function and do this in the finalize function: g_list_foreach (multipart->parts, (GFunc) camel_object_unref, NULL); Approving since your current patch correctly fixes the problem. The stuff above is optional.
Committed