[evolution-data-server] Bug #677697 - Huge memory leaks
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #677697 - Huge memory leaks
- Date: Wed, 27 Jun 2012 18:16:50 +0000 (UTC)
commit 1fcfd3371746557a4c0a8551d3355194d415d210
Author: Milan Crha <mcrha redhat com>
Date: Wed Jun 27 20:15:52 2012 +0200
Bug #677697 - Huge memory leaks
camel/camel-session.c | 3 +++
camel/camel-vee-summary.c | 11 +++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-session.c b/camel/camel-session.c
index f86fca0..0fcbc30 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -388,6 +388,9 @@ session_add_service (CamelSession *session,
if (provider != NULL)
service_type = provider->object_types[type];
+ if (error && *error)
+ return NULL;
+
if (service_type == G_TYPE_INVALID) {
g_set_error (
error, CAMEL_SERVICE_ERROR,
diff --git a/camel/camel-vee-summary.c b/camel/camel-vee-summary.c
index e4d026f..4ffbc41 100644
--- a/camel/camel-vee-summary.c
+++ b/camel/camel-vee-summary.c
@@ -489,6 +489,7 @@ camel_vee_summary_remove (CamelVeeSummary *summary,
const gchar *vuid,
CamelFolder *subfolder)
{
+ CamelMessageInfo *mi;
GHashTable *vuids;
g_return_if_fail (CAMEL_IS_VEE_SUMMARY (summary));
@@ -503,8 +504,18 @@ camel_vee_summary_remove (CamelVeeSummary *summary,
if (!g_hash_table_size (vuids))
g_hash_table_remove (summary->priv->vuids_by_subfolder, subfolder);
}
+
+ mi = camel_folder_summary_peek_loaded (&summary->summary, vuid);
+
camel_folder_summary_remove_uid (&summary->summary, vuid);
+ if (mi) {
+ /* under twice, the first for camel_folder_summary_peek_loaded(),
+ the second to actually free the mi */
+ camel_message_info_free (mi);
+ camel_message_info_free (mi);
+ }
+
camel_folder_summary_unlock (&summary->summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]