GNOME Bugzilla – Bug 702035
EWS folder rec_mutex leak
Last modified: 2013-07-15 16:07:14 UTC
==18892== 90,640 bytes in 2,266 blocks are definitely lost in loss record 44,331 of 44,487 ==18892== at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==18892== by 0x376804D93E: g_malloc (gmem.c:159) ==18892== by 0x37680634ED: g_slice_alloc (gslice.c:1003) ==18892== by 0x3768086F3F: g_rec_mutex_impl_new (gthread-posix.c:271) ==18892== by 0x3768087388: g_rec_mutex_init (gthread-posix.c:339) ==18892== by 0x15ADEBBF: camel_ews_folder_init (camel-ews-folder.c:1967) ==18892== by 0x3CFCC2FA9B: g_type_create_instance (gtype.c:1917) ==18892== by 0x3CFCC14597: g_object_constructor (gobject.c:1855) ==18892== by 0x3CFCC15B18: g_object_newv (gobject.c:1719) ==18892== by 0x3CFCC162E5: g_object_new_valist (gobject.c:1836) ==18892== by 0x3CFCC16653: g_object_new (gobject.c:1551) ==18892== by 0x15AE092A: camel_ews_folder_new (camel-ews-folder.c:1176) ==18892==
Created attachment 249002 [details] [review] Bug #702035 - EWS folder rec_mutex leak? Fix leak in cache_lock rec_mutex and in state_lock mutex
Review of attachment 249002 [details] [review]: ::: src/camel/camel-ews-folder.c @@ +1880,2 @@ g_hash_table_destroy (ews_folder->priv->uid_eflags); g_cond_clear (&ews_folder->priv->fetch_cond); Looks good, with one exception (not caused by you), please move these destructions into finalize, because the dispose can be called multiple times, which might cause use-after-free. As I said, it's not your fault, it was there before your change.
Created attachment 249162 [details] [review] Bug #702035 - EWS folder rec_mutex leak? Fix leak in cache_lock rec_mutex and in state_lock mutex
Review of attachment 249162 [details] [review]: Untested, but looks correct, please commit to master and stable. Thanks.
Pushed! master: https://git.gnome.org/browse/evolution-ews/commit/?id=8aed49fee1b926bef591d9687d85a8b99461784a gnome-3-8: https://git.gnome.org/browse/evolution-ews/commit/?h=gnome-3-8&id=73d19ee39b3a825e37eb47458f7bf57648e3e712