diff options
-rw-r--r-- | mail/e-mail-sidebar.c | 11 |
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; } |