[evolution-ews] Fix memory leak of CamelEwsSummary ->sync_state



commit 1d0040f59c16b51e8c171a46c942b1e3dfffd100
Author: David Woodhouse <David Woodhouse intel com>
Date:   Sat Aug 13 22:51:05 2011 +0100

    Fix memory leak of CamelEwsSummary ->sync_state

 src/camel/camel-ews-summary.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-ews-summary.c b/src/camel/camel-ews-summary.c
index 8d55dde..501c1b4 100644
--- a/src/camel/camel-ews-summary.c
+++ b/src/camel/camel-ews-summary.c
@@ -90,9 +90,24 @@ ews_message_info_free (CamelFolderSummary *s, CamelMessageInfo *mi)
 }
 
 static void
+ews_summary_finalize (GObject *object)
+{
+       CamelEwsSummary *ews_summary = CAMEL_EWS_SUMMARY (object);
+
+       g_free (ews_summary->sync_state);
+
+       /* Chain up to parent's finalize() method. */
+       G_OBJECT_CLASS (camel_ews_summary_parent_class)->finalize (object);
+}
+
+static void
 camel_ews_summary_class_init (CamelEwsSummaryClass *class)
 {
 	CamelFolderSummaryClass *folder_summary_class;
+	GObjectClass *object_class;
+
+	object_class = G_OBJECT_CLASS (class);
+	object_class->finalize = ews_summary_finalize;
 
 	folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (class);
 	folder_summary_class->message_info_size = sizeof (CamelEwsMessageInfo);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]