aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-06-28 02:17:28 +0800
committerMilan Crha <mcrha@redhat.com>2012-06-28 02:17:28 +0800
commite5eb699ce36f57891cbe255a8f4054ab6fc6acbd (patch)
tree97626e7202a38ecb8dfdcffd069ac59ab5eaa227
parent9cdae1a4cc9b5c0879c61eeee351036540fc473c (diff)
downloadgsoc2013-evolution-e5eb699ce36f57891cbe255a8f4054ab6fc6acbd.tar.gz
gsoc2013-evolution-e5eb699ce36f57891cbe255a8f4054ab6fc6acbd.tar.zst
gsoc2013-evolution-e5eb699ce36f57891cbe255a8f4054ab6fc6acbd.zip
Fix few memory leaks
-rw-r--r--mail/message-list.c13
-rw-r--r--modules/mail/e-mail-shell-sidebar.c2
2 files changed, 9 insertions, 6 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 850ef07037..849fae8ef9 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2665,15 +2665,16 @@ message_list_dispose (GObject *object)
priv->destroyed = TRUE;
- if (message_list->folder) {
+ if (message_list->folder)
mail_regen_cancel (message_list);
- if (message_list->uid_nodemap) {
- g_hash_table_foreach (message_list->uid_nodemap, (GHFunc) clear_info, message_list);
- g_hash_table_destroy (message_list->uid_nodemap);
- message_list->uid_nodemap = NULL;
- }
+ if (message_list->uid_nodemap) {
+ g_hash_table_foreach (message_list->uid_nodemap, (GHFunc) clear_info, message_list);
+ g_hash_table_destroy (message_list->uid_nodemap);
+ message_list->uid_nodemap = NULL;
+ }
+ if (message_list->folder) {
g_signal_handlers_disconnect_by_func (
message_list->folder, folder_changed, message_list);
g_object_unref (message_list->folder);
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index 857a0d6e0f..2c2cdfb4d5 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -73,6 +73,8 @@ mail_shell_sidebar_selection_changed_cb (EShellSidebar *shell_sidebar,
if (is_folder)
icon_name = em_folder_utils_get_icon_name (flags);
else {
+ g_free (display_name);
+
icon_name = shell_view_class->icon_name;
display_name = g_strdup (shell_view_class->label);
}