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 631754 - memory leak in imapx_server_get_message()
memory leak in imapx_server_get_message()
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.0.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks: 627707
 
 
Reported: 2010-10-09 13:21 UTC by David Woodhouse
Modified: 2013-09-14 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2010-10-09 13:21:44 UTC
==24277== 492 (300 direct, 192 indirect) bytes in 3 blocks are definitely lost in loss record 18,938 of 20,656
==24277==    at 0x4A0615D: malloc (vg_replace_malloc.c:195)
==24277==    by 0x3197848B52: g_malloc (gmem.c:164)
==24277==    by 0x319785F656: g_slice_alloc (gslice.c:842)
==24277==    by 0x319785F905: g_slice_alloc0 (gslice.c:854)
==24277==    by 0x319A4319AA: g_type_create_instance (gtype.c:1867)
==24277==    by 0x319A40FE8B: g_object_constructor (gobject.c:1597)
==24277==    by 0x319A412BB8: g_object_newv (gobject.c:1462)
==24277==    by 0x319A413E0B: g_object_new (gobject.c:1293)
==24277==    by 0x726761F: camel_stream_fs_new_with_fd (camel-stream-fs.c:268)
==24277==    by 0x723A104: camel_data_cache_add (camel-data-cache.c:385)
==24277==    by 0x1C7DBEBE: imapx_server_get_message (camel-imapx-server.c:5152)
==24277==    by 0x1C7D81B6: imapx_get_message_sync (camel-imapx-folder.c:391)
Comment 1 David Woodhouse 2010-10-09 13:22:12 UTC
Possibly just on the error path, and fixed by this?

--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -5176,6 +5176,8 @@ imapx_server_get_message (CamelIMAPXServer *is,
 
        if (success)
                stream = job->u.get_message.stream;
+       else
+               g_object_unref (job->u.get_message.stream);
 
        g_free (job);
Comment 2 Milan Crha 2010-10-21 10:39:57 UTC
Seems correct to me. Please commit to master.
Comment 3 David Woodhouse 2010-10-25 13:56:40 UTC
Commit ab18d195681af23e48fb6930f3073fb1a2a4659d in master.