aboutsummaryrefslogtreecommitdiffstats
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:13 +0800
commit084c926b592a9efbb8de5eaea8a03fffc19d8473 (patch)
tree0182d7dd43bdd29f585dc7d5f3df6332b28e687d
parentdadaaef68d7bf661583f70136d8bf29def39914b (diff)
downloadgsoc2013-evolution-084c926b592a9efbb8de5eaea8a03fffc19d8473.tar
gsoc2013-evolution-084c926b592a9efbb8de5eaea8a03fffc19d8473.tar.gz
gsoc2013-evolution-084c926b592a9efbb8de5eaea8a03fffc19d8473.tar.bz2
gsoc2013-evolution-084c926b592a9efbb8de5eaea8a03fffc19d8473.tar.lz
gsoc2013-evolution-084c926b592a9efbb8de5eaea8a03fffc19d8473.tar.xz
gsoc2013-evolution-084c926b592a9efbb8de5eaea8a03fffc19d8473.tar.zst
gsoc2013-evolution-084c926b592a9efbb8de5eaea8a03fffc19d8473.zip
Bug 614889 - Memory leaks in EMailSidebar
-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;
}