[evolution-ews] Bug #702035 - EWS folder rec_mutex leak?
- From: Fabiano Fidêncio <ffidencio src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug #702035 - EWS folder rec_mutex leak?
- Date: Mon, 15 Jul 2013 16:05:08 +0000 (UTC)
commit 8aed49fee1b926bef591d9687d85a8b99461784a
Author: Fabiano Fidêncio <fidencio redhat com>
Date: Fri Jul 12 15:17:20 2013 +0200
Bug #702035 - EWS folder rec_mutex leak?
Fix leak in cache_lock rec_mutex and in state_lock mutex
src/camel/camel-ews-folder.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index efac562..ae2bf4a 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -1874,10 +1874,6 @@ ews_folder_dispose (GObject *object)
ews_folder->search = NULL;
}
- g_mutex_clear (&ews_folder->priv->search_lock);
- g_hash_table_destroy (ews_folder->priv->uid_eflags);
- g_cond_clear (&ews_folder->priv->fetch_cond);
-
if (CAMEL_FOLDER (ews_folder)->summary)
g_signal_handlers_disconnect_by_func (CAMEL_FOLDER (ews_folder)->summary, G_CALLBACK
(ews_folder_count_notify_cb), ews_folder);
@@ -1886,6 +1882,23 @@ ews_folder_dispose (GObject *object)
}
static void
+ews_folder_finalize (GObject *object)
+{
+ CamelEwsFolder *ews_folder;
+
+ ews_folder = CAMEL_EWS_FOLDER (object);
+
+ g_mutex_clear (&ews_folder->priv->search_lock);
+ g_mutex_clear (&ews_folder->priv->state_lock);
+ g_rec_mutex_clear (&ews_folder->priv->cache_lock);
+ g_hash_table_destroy (ews_folder->priv->uid_eflags);
+ g_cond_clear (&ews_folder->priv->fetch_cond);
+
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (camel_ews_folder_parent_class)->finalize (object);
+}
+
+static void
ews_folder_constructed (GObject *object)
{
CamelNetworkSettings *network_settings;
@@ -1931,6 +1944,7 @@ camel_ews_folder_class_init (CamelEwsFolderClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->dispose = ews_folder_dispose;
+ object_class->finalize = ews_folder_finalize;
object_class->constructed = ews_folder_constructed;
folder_class = CAMEL_FOLDER_CLASS (class);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]