aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-sidebar.c
diff options
context:
space:
mode:
authorPaolo Borelli <pborelli@gnome.org>2010-04-07 11:41:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-07 11:41:57 +0800
commitb0999aea3cc58aaa56a245586765eca34613b90e (patch)
tree6bbcb0a2aaecb8dcf1956f0f9bcaf06687b8347f /mail/e-mail-sidebar.c
parentf248caf515c713b6f5c6892ccf984603bb813fe5 (diff)
downloadgsoc2013-evolution-b0999aea3cc58aaa56a245586765eca34613b90e.tar.gz
gsoc2013-evolution-b0999aea3cc58aaa56a245586765eca34613b90e.tar.zst
gsoc2013-evolution-b0999aea3cc58aaa56a245586765eca34613b90e.zip
Bug 614889 - Memory leaks in EMailSidebar
Diffstat (limited to 'mail/e-mail-sidebar.c')
-rw-r--r--mail/e-mail-sidebar.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c
index 1465f46393..5ed65f963b 100644
--- a/mail/e-mail-sidebar.c
+++ b/mail/e-mail-sidebar.c
@@ -151,6 +151,8 @@ mail_sidebar_selection_changed_cb (GtkTreeSelection *selection,
key_file, "Folder Tree", "Selected", NULL);
e_mail_sidebar_key_file_changed (sidebar);
+
+ g_free (uri);
}
static void
@@ -300,7 +302,6 @@ mail_sidebar_check_state (EMailSidebar *sidebar)
GtkTreeView *tree_view;
GtkTreeModel *model;
GtkTreeIter iter;
- CamelStore *local_store;
CamelStore *store;
gchar *full_name;
gchar *uri;
@@ -313,8 +314,6 @@ mail_sidebar_check_state (EMailSidebar *sidebar)
guint32 folder_flags = 0;
guint32 state = 0;
- local_store = e_mail_local_get_store ();
-
tree_view = GTK_TREE_VIEW (sidebar);
selection = gtk_tree_view_get_selection (tree_view);
@@ -330,8 +329,11 @@ mail_sidebar_check_state (EMailSidebar *sidebar)
COL_STRING_URI, &uri, -1);
if (!is_store && full_name != NULL) {
+ CamelStore *local_store;
guint32 folder_type;
+ local_store = e_mail_local_get_store ();
+
/* Is this a virtual junk or trash folder? */
is_junk = (strcmp (full_name, CAMEL_VJUNK_NAME) == 0);
is_trash = (strcmp (full_name, CAMEL_VTRASH_NAME) == 0);
@@ -369,6 +371,9 @@ mail_sidebar_check_state (EMailSidebar *sidebar)
if (is_trash)
state |= E_MAIL_SIDEBAR_FOLDER_IS_TRASH;
+ g_free (full_name);
+ g_free (uri);
+
return state;
}