Blame SOURCES/evolution-3.8.5-memory-leaks.patch

b1a0e4
diff -up evolution-3.8.5/addressbook/gui/widgets/e-addressbook-table-adapter.c.evo-leaks evolution-3.8.5/addressbook/gui/widgets/e-addressbook-table-adapter.c
b1a0e4
--- evolution-3.8.5/addressbook/gui/widgets/e-addressbook-table-adapter.c.evo-leaks	2013-08-10 23:38:42.000000000 +0200
b1a0e4
+++ evolution-3.8.5/addressbook/gui/widgets/e-addressbook-table-adapter.c	2014-05-13 14:51:30.900890765 +0200
b1a0e4
@@ -148,7 +148,7 @@ addressbook_value_at (ETableModel *etc,
b1a0e4
 		}
b1a0e4
 	}
b1a0e4
 
b1a0e4
-	return (gpointer)(value ? value : "");
b1a0e4
+	return g_strdup (value ? value : "");
b1a0e4
 }
b1a0e4
 
b1a0e4
 /* This function sets the value at a particular point in our ETableModel. */
b1a0e4
diff -up evolution-3.8.5/calendar/gui/dialogs/event-page.c.evo-leaks evolution-3.8.5/calendar/gui/dialogs/event-page.c
b1a0e4
--- evolution-3.8.5/calendar/gui/dialogs/event-page.c.evo-leaks	2013-07-23 14:52:33.000000000 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/dialogs/event-page.c	2014-05-13 14:51:30.900890765 +0200
b1a0e4
@@ -938,6 +938,7 @@ event_page_finalize (GObject *object)
b1a0e4
 	g_ptr_array_free (priv->deleted_attendees, TRUE);
b1a0e4
 
b1a0e4
 	g_free (priv->old_summary);
b1a0e4
+	g_free (priv->user_add);
b1a0e4
 
b1a0e4
 	priv->alarm_list_dlg_widget = NULL;
b1a0e4
 
b1a0e4
diff -up evolution-3.8.5/calendar/gui/e-alarm-list.c.evo-leaks evolution-3.8.5/calendar/gui/e-alarm-list.c
b1a0e4
--- evolution-3.8.5/calendar/gui/e-alarm-list.c.evo-leaks	2013-07-23 14:52:28.000000000 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/e-alarm-list.c	2014-05-13 14:51:30.900890765 +0200
b1a0e4
@@ -79,9 +79,22 @@ G_DEFINE_TYPE_WITH_CODE (
b1a0e4
 		e_alarm_list_tree_model_init))
b1a0e4
 
b1a0e4
 static void
b1a0e4
+alarm_list_dispose (GObject *object)
b1a0e4
+{
b1a0e4
+	e_alarm_list_clear (E_ALARM_LIST (object));
b1a0e4
+
b1a0e4
+	G_OBJECT_CLASS (e_alarm_list_parent_class)->dispose (object);
b1a0e4
+}
b1a0e4
+
b1a0e4
+static void
b1a0e4
 e_alarm_list_class_init (EAlarmListClass *class)
b1a0e4
 {
b1a0e4
+	GObjectClass *object_class;
b1a0e4
+
b1a0e4
 	column_types[E_ALARM_LIST_COLUMN_DESCRIPTION] = G_TYPE_STRING;
b1a0e4
+
b1a0e4
+	object_class = G_OBJECT_CLASS (class);
b1a0e4
+	object_class->dispose = alarm_list_dispose;
b1a0e4
 }
b1a0e4
 
b1a0e4
 static void
b1a0e4
diff -up evolution-3.8.5/calendar/gui/e-cal-model-calendar.c.evo-leaks evolution-3.8.5/calendar/gui/e-cal-model-calendar.c
b1a0e4
--- evolution-3.8.5/calendar/gui/e-cal-model-calendar.c.evo-leaks	2013-07-23 14:52:31.000000000 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/e-cal-model-calendar.c	2014-05-13 14:51:30.901890765 +0200
b1a0e4
@@ -438,8 +438,6 @@ ecmc_free_value (ETableModel *etm,
b1a0e4
 	case E_CAL_MODEL_CALENDAR_FIELD_DTEND :
b1a0e4
 	case E_CAL_MODEL_CALENDAR_FIELD_LOCATION :
b1a0e4
 	case E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY :
b1a0e4
-		if (value)
b1a0e4
-			g_free (value);
b1a0e4
 		break;
b1a0e4
 	}
b1a0e4
 }
b1a0e4
diff -up evolution-3.8.5/calendar/gui/e-cal-model-tasks.c.evo-leaks evolution-3.8.5/calendar/gui/e-cal-model-tasks.c
b1a0e4
--- evolution-3.8.5/calendar/gui/e-cal-model-tasks.c.evo-leaks	2013-07-23 14:52:35.000000000 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/e-cal-model-tasks.c	2014-05-13 14:51:30.901890765 +0200
b1a0e4
@@ -1049,8 +1049,6 @@ ecmt_free_value (ETableModel *etm,
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_STATUS :
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_URL :
b1a0e4
-		if (value)
b1a0e4
-			g_free (value);
b1a0e4
 		break;
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_PERCENT :
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
b1a0e4
@@ -1076,7 +1074,7 @@ ecmt_initialize_value (ETableModel *etm,
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_PRIORITY :
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_STATUS :
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_URL :
b1a0e4
-		return g_strdup ("");
b1a0e4
+		return (gpointer) "";
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_COMPLETED :
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_DUE :
b1a0e4
 	case E_CAL_MODEL_TASKS_FIELD_COMPLETE :
b1a0e4
diff -up evolution-3.8.5/calendar/gui/e-cal-model.c.evo-leaks evolution-3.8.5/calendar/gui/e-cal-model.c
b1a0e4
--- evolution-3.8.5/calendar/gui/e-cal-model.c.evo-leaks	2013-07-23 14:52:32.000000000 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/e-cal-model.c	2014-05-13 14:51:30.901890765 +0200
b1a0e4
@@ -701,7 +701,7 @@ cal_model_finalize (GObject *object)
b1a0e4
 		}
b1a0e4
 		g_object_unref (comp_data);
b1a0e4
 	}
b1a0e4
-	g_ptr_array_free (priv->objects, FALSE);
b1a0e4
+	g_ptr_array_free (priv->objects, TRUE);
b1a0e4
 
b1a0e4
 	g_mutex_clear (&priv->notify_lock);
b1a0e4
 
b1a0e4
@@ -1045,7 +1045,7 @@ get_categories (ECalModelComponent *comp
b1a0e4
 		}
b1a0e4
 	}
b1a0e4
 
b1a0e4
-	return comp_data->priv->categories_str->str;
b1a0e4
+	return g_strdup (comp_data->priv->categories_str->str);
b1a0e4
 }
b1a0e4
 
b1a0e4
 static gchar *
b1a0e4
@@ -1087,24 +1087,18 @@ static gpointer
b1a0e4
 get_description (ECalModelComponent *comp_data)
b1a0e4
 {
b1a0e4
 	icalproperty *prop;
b1a0e4
-	static GString *str = NULL;
b1a0e4
-
b1a0e4
-	if (str) {
b1a0e4
-		g_string_free (str, TRUE);
b1a0e4
-		str = NULL;
b1a0e4
-	}
b1a0e4
 
b1a0e4
 	prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY);
b1a0e4
 	if (prop) {
b1a0e4
-		str = g_string_new (NULL);
b1a0e4
+		GString *str = g_string_new (NULL);
b1a0e4
 		do {
b1a0e4
 			str = g_string_append (str, icalproperty_get_description (prop));
b1a0e4
 		} while ((prop = icalcomponent_get_next_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY)));
b1a0e4
 
b1a0e4
-		return str->str;
b1a0e4
+		return g_string_free (str, FALSE);
b1a0e4
 	}
b1a0e4
 
b1a0e4
-	return (gpointer) "";
b1a0e4
+	return g_strdup ("");
b1a0e4
 }
b1a0e4
 
b1a0e4
 static ECellDateEditValue *
b1a0e4
@@ -1204,9 +1198,9 @@ get_summary (ECalModelComponent *comp_da
b1a0e4
 
b1a0e4
 	prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_SUMMARY_PROPERTY);
b1a0e4
 	if (prop)
b1a0e4
-		return (gpointer) icalproperty_get_summary (prop);
b1a0e4
+		return g_strdup (icalproperty_get_summary (prop));
b1a0e4
 
b1a0e4
-	return (gpointer) "";
b1a0e4
+	return g_strdup ("");
b1a0e4
 }
b1a0e4
 
b1a0e4
 static gchar *
b1a0e4
@@ -1789,8 +1783,8 @@ ecm_free_value (ETableModel *etm,
b1a0e4
 	case E_CAL_MODEL_FIELD_HAS_ALARMS :
b1a0e4
 	case E_CAL_MODEL_FIELD_ICON :
b1a0e4
 	case E_CAL_MODEL_FIELD_COLOR :
b1a0e4
+	case E_CAL_MODEL_FIELD_DTSTART:
b1a0e4
 		break;
b1a0e4
-	case E_CAL_MODEL_FIELD_DTSTART :
b1a0e4
 	case E_CAL_MODEL_FIELD_CREATED :
b1a0e4
 	case E_CAL_MODEL_FIELD_LASTMODIFIED :
b1a0e4
 		if (value)
b1a0e4
diff -up evolution-3.8.5/calendar/gui/e-cell-date-edit-text.c.evo-leaks evolution-3.8.5/calendar/gui/e-cell-date-edit-text.c
b1a0e4
--- evolution-3.8.5/calendar/gui/e-cell-date-edit-text.c.evo-leaks	2013-07-23 14:52:32.000000000 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/e-cell-date-edit-text.c	2014-05-13 14:51:30.901890765 +0200
b1a0e4
@@ -135,6 +135,8 @@ cell_date_edit_text_get_text (ECellText
b1a0e4
 
b1a0e4
 static void
b1a0e4
 cell_date_edit_text_free_text (ECellText *cell,
b1a0e4
+			       ETableModel *model,
b1a0e4
+			       gint col,
b1a0e4
                                gchar *text)
b1a0e4
 {
b1a0e4
 	g_free (text);
b1a0e4
diff -up evolution-3.8.5/calendar/gui/e-day-view.c.evo-leaks evolution-3.8.5/calendar/gui/e-day-view.c
b1a0e4
--- evolution-3.8.5/calendar/gui/e-day-view.c.evo-leaks	2014-05-13 14:51:30.895890765 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/e-day-view.c	2014-05-13 14:51:30.902890765 +0200
b1a0e4
@@ -803,6 +803,12 @@ day_view_dispose (GObject *object)
b1a0e4
 		day_view->grabbed_pointer = NULL;
b1a0e4
 	}
b1a0e4
 
b1a0e4
+	g_free (day_view->marcus_bains_day_view_color);
b1a0e4
+	day_view->marcus_bains_day_view_color = NULL;
b1a0e4
+
b1a0e4
+	g_free (day_view->marcus_bains_time_bar_color);
b1a0e4
+	day_view->marcus_bains_time_bar_color = NULL;
b1a0e4
+
b1a0e4
 	/* Chain up to parent's dispose() method. */
b1a0e4
 	G_OBJECT_CLASS (e_day_view_parent_class)->dispose (object);
b1a0e4
 }
b1a0e4
diff -up evolution-3.8.5/calendar/gui/e-meeting-list-view.c.evo-leaks evolution-3.8.5/calendar/gui/e-meeting-list-view.c
b1a0e4
--- evolution-3.8.5/calendar/gui/e-meeting-list-view.c.evo-leaks	2013-07-23 14:52:36.000000000 +0200
b1a0e4
+++ evolution-3.8.5/calendar/gui/e-meeting-list-view.c	2014-05-13 14:51:30.902890765 +0200
b1a0e4
@@ -839,6 +839,8 @@ e_meeting_list_view_column_set_visible (
b1a0e4
 			break;
b1a0e4
 		}
b1a0e4
 	}
b1a0e4
+
b1a0e4
+	g_list_free (cols);
b1a0e4
 }
b1a0e4
 
b1a0e4
 void
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-combo.c.evo-leaks evolution-3.8.5/e-util/e-cell-combo.c
b1a0e4
--- evolution-3.8.5/e-util/e-cell-combo.c.evo-leaks	2013-07-23 14:52:10.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-combo.c	2014-05-13 14:51:30.903890765 +0200
b1a0e4
@@ -407,7 +407,8 @@ e_cell_combo_select_matching_item (ECell
b1a0e4
 	if (!found)
b1a0e4
 		gtk_tree_selection_unselect_all (selection);
b1a0e4
 
b1a0e4
-	e_cell_text_free_text (ecell_text, cell_text);
b1a0e4
+	e_cell_text_free_text (ecell_text, ecv->e_table_model,
b1a0e4
+		ecol->col_idx, cell_text);
b1a0e4
 }
b1a0e4
 
b1a0e4
 static void
b1a0e4
@@ -820,7 +821,8 @@ e_cell_combo_update_cell (ECellCombo *ec
b1a0e4
 			ecol->col_idx, ecp->popup_row, text);
b1a0e4
 	}
b1a0e4
 
b1a0e4
-	e_cell_text_free_text (ecell_text, old_text);
b1a0e4
+	e_cell_text_free_text (ecell_text, ecv->e_table_model,
b1a0e4
+		ecol->col_idx, old_text);
b1a0e4
 	g_free (text);
b1a0e4
 }
b1a0e4
 
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-date-edit.c.evo-leaks evolution-3.8.5/e-util/e-cell-date-edit.c
b1a0e4
--- evolution-3.8.5/e-util/e-cell-date-edit.c.evo-leaks	2013-07-23 14:52:05.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-date-edit.c	2014-05-13 14:51:30.903890765 +0200
b1a0e4
@@ -564,7 +564,8 @@ e_cell_date_edit_set_popup_values (ECell
b1a0e4
 		}
b1a0e4
 	}
b1a0e4
 
b1a0e4
-	e_cell_text_free_text (ecell_text, cell_text);
b1a0e4
+	e_cell_text_free_text (ecell_text, ecv->e_table_model,
b1a0e4
+		ecol->col_idx, cell_text);
b1a0e4
 }
b1a0e4
 
b1a0e4
 static void
b1a0e4
@@ -964,7 +965,8 @@ e_cell_date_edit_update_cell (ECellDateE
b1a0e4
 			ecol->col_idx, ecp->popup_row, NULL);
b1a0e4
 	}
b1a0e4
 
b1a0e4
-	e_cell_text_free_text (ecell_text, old_text);
b1a0e4
+	e_cell_text_free_text (ecell_text, ecv->e_table_model,
b1a0e4
+		ecol->col_idx, old_text);
b1a0e4
 }
b1a0e4
 
b1a0e4
 static void
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-date.c.evo-leaks evolution-3.8.5/e-util/e-cell-date.c
b1a0e4
--- evolution-3.8.5/e-util/e-cell-date.c.evo-leaks	2013-07-23 14:52:04.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-date.c	2014-05-13 14:51:30.903890765 +0200
b1a0e4
@@ -63,6 +63,8 @@ ecd_get_text (ECellText *cell,
b1a0e4
 
b1a0e4
 static void
b1a0e4
 ecd_free_text (ECellText *cell,
b1a0e4
+	       ETableModel *model,
b1a0e4
+	       gint col,
b1a0e4
                gchar *text)
b1a0e4
 {
b1a0e4
 	g_free (text);
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-number.c.evo-leaks evolution-3.8.5/e-util/e-cell-number.c
b1a0e4
--- evolution-3.8.5/e-util/e-cell-number.c.evo-leaks	2013-07-23 14:52:13.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-number.c	2014-05-13 14:51:30.903890765 +0200
b1a0e4
@@ -50,6 +50,8 @@ ecn_get_text (ECellText *cell,
b1a0e4
 
b1a0e4
 static void
b1a0e4
 ecn_free_text (ECellText *cell,
b1a0e4
+	       ETableModel *model,
b1a0e4
+	       gint col,
b1a0e4
                gchar *text)
b1a0e4
 {
b1a0e4
 	g_free (text);
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-percent.c.evo-leaks evolution-3.8.5/e-util/e-cell-percent.c
b1a0e4
--- evolution-3.8.5/e-util/e-cell-percent.c.evo-leaks	2013-07-23 14:51:59.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-percent.c	2014-05-13 14:51:30.903890765 +0200
b1a0e4
@@ -63,6 +63,8 @@ ecp_get_text (ECellText *cell,
b1a0e4
 
b1a0e4
 static void
b1a0e4
 ecp_free_text (ECellText *cell,
b1a0e4
+	       ETableModel *model,
b1a0e4
+	       gint col,
b1a0e4
                gchar *text)
b1a0e4
 {
b1a0e4
 	/* Do Nothing. */
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-size.c.evo-leaks evolution-3.8.5/e-util/e-cell-size.c
b1a0e4
--- evolution-3.8.5/e-util/e-cell-size.c.evo-leaks	2013-07-23 14:52:08.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-size.c	2014-05-13 14:51:30.903890765 +0200
b1a0e4
@@ -55,6 +55,8 @@ ecd_get_text (ECellText *cell,
b1a0e4
 
b1a0e4
 static void
b1a0e4
 ecd_free_text (ECellText *cell,
b1a0e4
+	       ETableModel *model,
b1a0e4
+	       gint col,
b1a0e4
                gchar *text)
b1a0e4
 {
b1a0e4
 	g_free (text);
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-text.c.evo-leaks evolution-3.8.5/e-util/e-cell-text.c
b1a0e4
--- evolution-3.8.5/e-util/e-cell-text.c.evo-leaks	2013-08-03 15:22:43.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-text.c	2014-05-13 14:51:30.904890765 +0200
b1a0e4
@@ -218,8 +218,11 @@ ect_real_get_text (ECellText *cell,
b1a0e4
 
b1a0e4
 static void
b1a0e4
 ect_real_free_text (ECellText *cell,
b1a0e4
+		    ETableModel *model,
b1a0e4
+		    gint col,
b1a0e4
                     gchar *text)
b1a0e4
 {
b1a0e4
+	e_table_model_free_value (model, col, text);
b1a0e4
 }
b1a0e4
 
b1a0e4
 /* This is the default method for setting the ETableModel value based on
b1a0e4
@@ -600,7 +603,7 @@ generate_layout (ECellTextView *text_vie
b1a0e4
 	if (row >= 0) {
b1a0e4
 		gchar *temp = e_cell_text_get_text (ect, ecell_view->e_table_model, model_col, row);
b1a0e4
 		layout = build_layout (text_view, row, temp ? temp : "?", width);
b1a0e4
-		e_cell_text_free_text (ect, temp);
b1a0e4
+		e_cell_text_free_text (ect, ecell_view->e_table_model, model_col, temp);
b1a0e4
 	} else
b1a0e4
 		layout = build_layout (text_view, row, "Mumbo Jumbo", width);
b1a0e4
 
b1a0e4
@@ -1143,7 +1146,7 @@ ect_enter_edit (ECellView *ecell_view,
b1a0e4
 
b1a0e4
 	temp = e_cell_text_get_text (ect, ecell_view->e_table_model, model_col, row);
b1a0e4
 	edit->old_text = g_strdup (temp);
b1a0e4
-	e_cell_text_free_text (ect, temp);
b1a0e4
+	e_cell_text_free_text (ect, ecell_view->e_table_model, model_col, temp);
b1a0e4
 	edit->text = g_strdup (edit->old_text);
b1a0e4
 
b1a0e4
 	if (edit->im_context) {
b1a0e4
@@ -1386,7 +1389,7 @@ ect_print (ECellView *ecell_view,
b1a0e4
 
b1a0e4
 	pango_font_description_free (font_des);
b1a0e4
 	g_object_unref (layout);
b1a0e4
-	e_cell_text_free_text (ect, string);
b1a0e4
+	e_cell_text_free_text (ect, ecell_view->e_table_model, model_col, string);
b1a0e4
 }
b1a0e4
 
b1a0e4
 static gdouble
b1a0e4
@@ -1942,6 +1945,8 @@ e_cell_text_get_text (ECellText *cell,
b1a0e4
 
b1a0e4
 void
b1a0e4
 e_cell_text_free_text (ECellText *cell,
b1a0e4
+		       ETableModel *model,
b1a0e4
+		       gint col,
b1a0e4
                        gchar *text)
b1a0e4
 {
b1a0e4
 	ECellTextClass *class;
b1a0e4
@@ -1952,7 +1957,7 @@ e_cell_text_free_text (ECellText *cell,
b1a0e4
 	if (class->free_text == NULL)
b1a0e4
 		return;
b1a0e4
 
b1a0e4
-	class->free_text (cell, text);
b1a0e4
+	class->free_text (cell, model, col, text);
b1a0e4
 }
b1a0e4
 
b1a0e4
 void
b1a0e4
@@ -2802,7 +2807,7 @@ e_cell_text_get_text_by_view (ECellView
b1a0e4
 			E_CELL_TEXT (cell_view->ecell),
b1a0e4
 			cell_view->e_table_model, col, row);
b1a0e4
 		ret = g_strdup (model_text);
b1a0e4
-		e_cell_text_free_text (E_CELL_TEXT (cell_view->ecell), model_text);
b1a0e4
+		e_cell_text_free_text (E_CELL_TEXT (cell_view->ecell), cell_view->e_table_model, col, model_text);
b1a0e4
 	}
b1a0e4
 
b1a0e4
 	return ret;
b1a0e4
diff -up evolution-3.8.5/e-util/e-cell-text.h.evo-leaks evolution-3.8.5/e-util/e-cell-text.h
b1a0e4
--- evolution-3.8.5/e-util/e-cell-text.h.evo-leaks	2013-08-03 15:22:43.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-cell-text.h	2014-05-13 14:51:30.904890765 +0200
b1a0e4
@@ -107,6 +107,8 @@ struct _ECellTextClass {
b1a0e4
 						 gint col,
b1a0e4
 						 gint row);
b1a0e4
 	void		(*free_text)		(ECellText *cell,
b1a0e4
+						 ETableModel *model,
b1a0e4
+						 gint col,
b1a0e4
 						 gchar *text);
b1a0e4
 	void		(*set_value)		(ECellText *cell,
b1a0e4
 						 ETableModel *model,
b1a0e4
@@ -146,6 +148,8 @@ gchar *		e_cell_text_get_text		(ECellTex
b1a0e4
 
b1a0e4
 /* Frees the value returned by e_cell_text_get_text(). */
b1a0e4
 void		e_cell_text_free_text		(ECellText *cell,
b1a0e4
+						 ETableModel *model,
b1a0e4
+						 gint col,
b1a0e4
 						 gchar *text);
b1a0e4
 
b1a0e4
 /* Sets the ETableModel value, based on the given string. */
b1a0e4
diff -up evolution-3.8.5/e-util/e-file-request.c.evo-leaks evolution-3.8.5/e-util/e-file-request.c
b1a0e4
--- evolution-3.8.5/e-util/e-file-request.c.evo-leaks	2013-07-23 14:52:11.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-file-request.c	2014-05-13 14:51:30.897890765 +0200
b1a0e4
@@ -60,7 +60,7 @@ handle_file_request (GSimpleAsyncResult
b1a0e4
 
b1a0e4
 		stream = g_memory_input_stream_new_from_data (
b1a0e4
 				contents, length, (GDestroyNotify) g_free);
b1a0e4
-		g_simple_async_result_set_op_res_gpointer (res, stream, NULL);
b1a0e4
+		g_simple_async_result_set_op_res_gpointer (res, stream, g_object_unref);
b1a0e4
 	}
b1a0e4
 }
b1a0e4
 
b1a0e4
@@ -130,6 +130,8 @@ file_request_send_finish (SoupRequest *r
b1a0e4
 
b1a0e4
 	if (!stream) /* We must always return something */
b1a0e4
 		stream = g_memory_input_stream_new ();
b1a0e4
+	else
b1a0e4
+		g_object_ref (stream);
b1a0e4
 
b1a0e4
 	return stream;
b1a0e4
 }
b1a0e4
diff -up evolution-3.8.5/e-util/e-table-one.c.evo-leaks evolution-3.8.5/e-util/e-table-one.c
b1a0e4
--- evolution-3.8.5/e-util/e-table-one.c.evo-leaks	2013-07-23 14:52:16.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-table-one.c	2014-05-13 14:51:30.904890765 +0200
b1a0e4
@@ -109,6 +109,8 @@ one_free_value (ETableModel *etm,
b1a0e4
 
b1a0e4
 	if (one->source)
b1a0e4
 		e_table_model_free_value (one->source, col, value);
b1a0e4
+	if (one->data)
b1a0e4
+		one->data[col] = one->source ? e_table_model_initialize_value (one->source, col) : NULL;
b1a0e4
 }
b1a0e4
 
b1a0e4
 static gpointer
b1a0e4
diff -up evolution-3.8.5/e-util/e-web-view.c.evo-leaks evolution-3.8.5/e-util/e-web-view.c
b1a0e4
--- evolution-3.8.5/e-util/e-web-view.c.evo-leaks	2013-07-23 14:52:00.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/e-web-view.c	2014-05-13 14:51:30.905890765 +0200
b1a0e4
@@ -1661,6 +1661,7 @@ e_web_view_init (EWebView *web_view)
b1a0e4
 			settings, "changed::antialiasing",
b1a0e4
 			G_CALLBACK (e_web_view_update_fonts), web_view);
b1a0e4
 		web_view->priv->aliasing_settings = settings;
b1a0e4
+		g_settings_schema_unref (settings_schema);
b1a0e4
 	}
b1a0e4
 
b1a0e4
 	e_web_view_update_fonts (web_view);
b1a0e4
diff -up evolution-3.8.5/e-util/gal-a11y-e-table-item.c.evo-leaks evolution-3.8.5/e-util/gal-a11y-e-table-item.c
b1a0e4
--- evolution-3.8.5/e-util/gal-a11y-e-table-item.c.evo-leaks	2013-07-23 14:52:12.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/gal-a11y-e-table-item.c	2014-05-13 14:51:30.905890765 +0200
b1a0e4
@@ -875,9 +875,9 @@ eti_header_structure_changed (ETableHead
b1a0e4
 	g_return_if_fail (cols && prev_cols && n_cols > 0);
b1a0e4
 
b1a0e4
         /* Init to ETI_HEADER_UNCHANGED. */
b1a0e4
-	state = g_malloc0 (sizeof (gint) * n_cols);
b1a0e4
-	prev_state = g_malloc0 (sizeof (gint) * prev_n_cols);
b1a0e4
-	reorder = g_malloc0 (sizeof (gint) * n_cols);
b1a0e4
+	state = g_malloc0 (sizeof (gint) * (MAX (prev_n_cols, n_cols) + 1));
b1a0e4
+	prev_state = g_malloc0 (sizeof (gint) * (MAX (prev_n_cols, n_cols) + 1));
b1a0e4
+	reorder = g_malloc0 (sizeof (gint) * (MAX (prev_n_cols, n_cols) + 1));
b1a0e4
 
b1a0e4
         /* Compare with previously saved column headers. */
b1a0e4
 	for (i = 0; i < n_cols && cols[i]; i++) {
b1a0e4
diff -up evolution-3.8.5/e-util/gal-view-instance.c.evo-leaks evolution-3.8.5/e-util/gal-view-instance.c
b1a0e4
--- evolution-3.8.5/e-util/gal-view-instance.c.evo-leaks	2013-07-23 14:52:10.000000000 +0200
b1a0e4
+++ evolution-3.8.5/e-util/gal-view-instance.c	2014-05-13 14:51:30.905890765 +0200
b1a0e4
@@ -271,7 +271,9 @@ load_current_view (GalViewInstance *inst
b1a0e4
 	}
b1a0e4
 
b1a0e4
 	if (doc == NULL) {
b1a0e4
-		instance->current_id = g_strdup (gal_view_instance_get_default_view (instance));
b1a0e4
+		gchar *view_id = g_strdup (gal_view_instance_get_default_view (instance));
b1a0e4
+		g_free (instance->current_id);
b1a0e4
+		instance->current_id = view_id;
b1a0e4
 
b1a0e4
 		if (instance->current_id) {
b1a0e4
 			gint index = gal_view_collection_get_view_index_by_id (
b1a0e4
@@ -289,6 +291,7 @@ load_current_view (GalViewInstance *inst
b1a0e4
 	}
b1a0e4
 
b1a0e4
 	root = xmlDocGetRootElement (doc);
b1a0e4
+	g_free (instance->current_id);
b1a0e4
 	instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view", NULL);
b1a0e4
 
b1a0e4
 	if (instance->current_id != NULL) {
b1a0e4
diff -up evolution-3.8.5/mail/e-http-request.c.evo-leaks evolution-3.8.5/mail/e-http-request.c
b1a0e4
--- evolution-3.8.5/mail/e-http-request.c.evo-leaks	2013-08-01 14:12:41.000000000 +0200
b1a0e4
+++ evolution-3.8.5/mail/e-http-request.c	2014-05-13 14:51:30.897890765 +0200
b1a0e4
@@ -259,7 +259,7 @@ handle_http_request (GSimpleAsyncResult
b1a0e4
 			g_free (path);
b1a0e4
 
b1a0e4
 			/* Set result and quit the thread */
b1a0e4
-			g_simple_async_result_set_op_res_gpointer (res, stream, NULL);
b1a0e4
+			g_simple_async_result_set_op_res_gpointer (res, stream, g_object_unref);
b1a0e4
 
b1a0e4
 			goto cleanup;
b1a0e4
 		} else {
b1a0e4
@@ -415,7 +415,7 @@ handle_http_request (GSimpleAsyncResult
b1a0e4
 			uri, request->priv->content_type,
b1a0e4
 			request->priv->content_length, uri_md5));
b1a0e4
 
b1a0e4
-		g_simple_async_result_set_op_res_gpointer (res, stream, NULL);
b1a0e4
+		g_simple_async_result_set_op_res_gpointer (res, stream, g_object_unref);
b1a0e4
 		goto cleanup;
b1a0e4
 	}
b1a0e4
 
b1a0e4
@@ -526,6 +526,8 @@ http_request_send_finish (SoupRequest *r
b1a0e4
 
b1a0e4
 	if (!stream) /* We must always return something */
b1a0e4
 		stream = g_memory_input_stream_new ();
b1a0e4
+	else
b1a0e4
+		g_object_ref (stream);
b1a0e4
 
b1a0e4
 	return stream;
b1a0e4
 }
b1a0e4
diff -up evolution-3.8.5/mail/em-folder-tree.c.evo-leaks evolution-3.8.5/mail/em-folder-tree.c
b1a0e4
--- evolution-3.8.5/mail/em-folder-tree.c.evo-leaks	2013-07-23 14:51:50.000000000 +0200
b1a0e4
+++ evolution-3.8.5/mail/em-folder-tree.c	2014-05-13 14:51:30.898890765 +0200
b1a0e4
@@ -3107,6 +3107,8 @@ em_folder_tree_select_next_path (EMFolde
b1a0e4
 		/* TODO : Flags here for better options */
b1a0e4
 		} while (skip_read_folders && unread <=0 &&
b1a0e4
 			gtk_tree_path_compare (current_path, path));
b1a0e4
+
b1a0e4
+		gtk_tree_path_free (current_path);
b1a0e4
 	}
b1a0e4
 
b1a0e4
 	if (path) {
b1a0e4
@@ -3120,6 +3122,8 @@ em_folder_tree_select_next_path (EMFolde
b1a0e4
 			priv->cursor_set = TRUE;
b1a0e4
 		}
b1a0e4
 		gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.5f, 0.0f);
b1a0e4
+
b1a0e4
+		gtk_tree_path_free (path);
b1a0e4
 	}
b1a0e4
 	return;
b1a0e4
 }
b1a0e4
diff -up evolution-3.8.5/mail/message-list.c.evo-leaks evolution-3.8.5/mail/message-list.c
b1a0e4
--- evolution-3.8.5/mail/message-list.c.evo-leaks	2013-08-03 15:22:43.000000000 +0200
b1a0e4
+++ evolution-3.8.5/mail/message-list.c	2014-05-13 14:51:30.906890765 +0200
b1a0e4
@@ -1103,6 +1103,7 @@ ml_duplicate_value (ETreeModel *etm,
b1a0e4
 	case COL_SENT:
b1a0e4
 	case COL_RECEIVED:
b1a0e4
 	case COL_SIZE:
b1a0e4
+	case COL_FOLLOWUP_FLAG:
b1a0e4
 	case COL_FOLLOWUP_FLAG_STATUS:
b1a0e4
 	case COL_FOLLOWUP_DUE_BY:
b1a0e4
 		return (gpointer) value;
b1a0e4
@@ -1114,7 +1115,6 @@ ml_duplicate_value (ETreeModel *etm,
b1a0e4
 	case COL_RECIPIENTS:
b1a0e4
 	case COL_MIXED_SENDER:
b1a0e4
 	case COL_MIXED_RECIPIENTS:
b1a0e4
-	case COL_FOLLOWUP_FLAG:
b1a0e4
 	case COL_LOCATION:
b1a0e4
 	case COL_LABELS:
b1a0e4
 		return g_strdup (value);
b1a0e4
@@ -1140,19 +1140,19 @@ ml_free_value (ETreeModel *etm,
b1a0e4
 	case COL_SENT:
b1a0e4
 	case COL_RECEIVED:
b1a0e4
 	case COL_SIZE:
b1a0e4
+	case COL_FOLLOWUP_FLAG:
b1a0e4
 	case COL_FOLLOWUP_FLAG_STATUS:
b1a0e4
 	case COL_FOLLOWUP_DUE_BY:
b1a0e4
+	case COL_FROM:
b1a0e4
 	case COL_FROM_NORM:
b1a0e4
+	case COL_SUBJECT:
b1a0e4
 	case COL_SUBJECT_NORM:
b1a0e4
+	case COL_TO:
b1a0e4
 	case COL_TO_NORM:
b1a0e4
 	case COL_SUBJECT_TRIMMED:
b1a0e4
 	case COL_COLOUR:
b1a0e4
 		break;
b1a0e4
 
b1a0e4
-	case COL_FROM:
b1a0e4
-	case COL_SUBJECT:
b1a0e4
-	case COL_TO:
b1a0e4
-	case COL_FOLLOWUP_FLAG:
b1a0e4
 	case COL_LOCATION:
b1a0e4
 	case COL_SENDER:
b1a0e4
 	case COL_RECIPIENTS:
b1a0e4
@@ -1181,14 +1181,14 @@ ml_initialize_value (ETreeModel *etm,
b1a0e4
 	case COL_SENT:
b1a0e4
 	case COL_RECEIVED:
b1a0e4
 	case COL_SIZE:
b1a0e4
+	case COL_FROM:
b1a0e4
+	case COL_TO:
b1a0e4
+	case COL_FOLLOWUP_FLAG:
b1a0e4
 	case COL_FOLLOWUP_FLAG_STATUS:
b1a0e4
 	case COL_FOLLOWUP_DUE_BY:
b1a0e4
+	case COL_SUBJECT:
b1a0e4
 		return NULL;
b1a0e4
 
b1a0e4
-	case COL_FROM:
b1a0e4
-	case COL_SUBJECT:
b1a0e4
-	case COL_TO:
b1a0e4
-	case COL_FOLLOWUP_FLAG:
b1a0e4
 	case COL_LOCATION:
b1a0e4
 	case COL_SENDER:
b1a0e4
 	case COL_RECIPIENTS:
b1a0e4
@@ -1401,7 +1401,7 @@ sanitize_recipients (const gchar *string
b1a0e4
 	gchar **name;
b1a0e4
 
b1a0e4
 	if (!string || !*string)
b1a0e4
-		return (gchar *) "";
b1a0e4
+		return g_string_free (recipients, FALSE);
b1a0e4
 
b1a0e4
 	gstring = g_string_new ("");
b1a0e4
 
b1a0e4
@@ -1765,7 +1765,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
b1a0e4
 			return (gpointer)(res);
b1a0e4
 		}
b1a0e4
 		else
b1a0e4
-			return (gpointer)("");
b1a0e4
+			return (gpointer) g_strdup ("");
b1a0e4
 	}
b1a0e4
 	case COL_LABELS:{
b1a0e4
 		struct LabelsData ld;
b1a0e4
diff -up evolution-3.8.5/modules/itip-formatter/e-mail-formatter-itip.c.evo-leaks evolution-3.8.5/modules/itip-formatter/e-mail-formatter-itip.c
b1a0e4
--- evolution-3.8.5/modules/itip-formatter/e-mail-formatter-itip.c.evo-leaks	2013-07-23 14:51:41.000000000 +0200
b1a0e4
+++ evolution-3.8.5/modules/itip-formatter/e-mail-formatter-itip.c	2014-05-13 14:51:30.898890765 +0200
b1a0e4
@@ -100,6 +100,10 @@ emfe_itip_format (EMailFormatterExtensio
b1a0e4
 				folder, message_uid, "$has_cal", TRUE);
b1a0e4
 		}
b1a0e4
 
b1a0e4
+		g_clear_object (&itip_part->folder);
b1a0e4
+		g_clear_object (&itip_part->msg);
b1a0e4
+		g_free (itip_part->uid);
b1a0e4
+
b1a0e4
 		itip_part->folder = g_object_ref (folder);
b1a0e4
 		itip_part->uid = g_strdup (message_uid);
b1a0e4
 		itip_part->msg = g_object_ref (message);
b1a0e4
diff -up evolution-3.8.5/modules/itip-formatter/e-mail-parser-itip.c.evo-leaks evolution-3.8.5/modules/itip-formatter/e-mail-parser-itip.c
b1a0e4
--- evolution-3.8.5/modules/itip-formatter/e-mail-parser-itip.c.evo-leaks	2013-07-23 14:51:40.000000000 +0200
b1a0e4
+++ evolution-3.8.5/modules/itip-formatter/e-mail-parser-itip.c	2014-05-13 14:51:30.898890765 +0200
b1a0e4
@@ -110,6 +110,9 @@ mail_part_itip_free (EMailPart *mail_par
b1a0e4
 	g_free (pitip->uid);
b1a0e4
 	g_hash_table_destroy (pitip->real_comps);
b1a0e4
 
b1a0e4
+	g_clear_object (&pitip->msg);
b1a0e4
+	g_clear_object (&pitip->folder);
b1a0e4
+
b1a0e4
 	g_clear_object (&pitip->view);
b1a0e4
 }
b1a0e4
 
b1a0e4
diff -up evolution-3.8.5/modules/itip-formatter/itip-view.c.evo-leaks evolution-3.8.5/modules/itip-formatter/itip-view.c
b1a0e4
--- evolution-3.8.5/modules/itip-formatter/itip-view.c.evo-leaks	2013-07-23 14:51:41.000000000 +0200
b1a0e4
+++ evolution-3.8.5/modules/itip-formatter/itip-view.c	2014-05-13 14:51:30.899890765 +0200
b1a0e4
@@ -5391,6 +5391,41 @@ extract_itip_data (EMailPartItip *pitip,
b1a0e4
 		return FALSE;
b1a0e4
 	}
b1a0e4
 
b1a0e4
+	if (pitip->comp) {
b1a0e4
+		g_object_unref (pitip->comp);
b1a0e4
+		pitip->comp = NULL;
b1a0e4
+	}
b1a0e4
+
b1a0e4
+	if (pitip->top_level) {
b1a0e4
+		icalcomponent_free (pitip->top_level);
b1a0e4
+		pitip->top_level = NULL;
b1a0e4
+	}
b1a0e4
+
b1a0e4
+	if (pitip->main_comp) {
b1a0e4
+		icalcomponent_free (pitip->main_comp);
b1a0e4
+		pitip->main_comp = NULL;
b1a0e4
+	}
b1a0e4
+	pitip->ical_comp = NULL;
b1a0e4
+
b1a0e4
+	g_free (pitip->calendar_uid);
b1a0e4
+	pitip->calendar_uid = NULL;
b1a0e4
+
b1a0e4
+	g_free (pitip->from_address);
b1a0e4
+	pitip->from_address = NULL;
b1a0e4
+	g_free (pitip->from_name);
b1a0e4
+	pitip->from_name = NULL;
b1a0e4
+	g_free (pitip->to_address);
b1a0e4
+	pitip->to_address = NULL;
b1a0e4
+	g_free (pitip->to_name);
b1a0e4
+	pitip->to_name = NULL;
b1a0e4
+	g_free (pitip->delegator_address);
b1a0e4
+	pitip->delegator_address = NULL;
b1a0e4
+	g_free (pitip->delegator_name);
b1a0e4
+	pitip->delegator_name = NULL;
b1a0e4
+	g_free (pitip->my_address);
b1a0e4
+	pitip->my_address = NULL;
b1a0e4
+	g_hash_table_remove_all (pitip->real_comps);
b1a0e4
+
b1a0e4
 	pitip->top_level = e_cal_util_new_top_level ();
b1a0e4
 
b1a0e4
 	pitip->main_comp = icalparser_parse_string (pitip->vcalendar);
b1a0e4
@@ -5848,6 +5883,7 @@ itip_view_init_view (ItipView *view)
b1a0e4
 	client_cache = e_shell_get_client_cache (shell);
b1a0e4
 	shell_settings = e_shell_get_shell_settings (shell);
b1a0e4
 
b1a0e4
+	g_clear_object (&info->client_cache);
b1a0e4
 	info->client_cache = g_object_ref (client_cache);
b1a0e4
 
b1a0e4
         /* Reset current client before initializing view */