aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-15 20:38:44 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:29 +0800
commitd09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7 (patch)
tree94fb02644f94c171002371ba0473dfe32d97789a /mail
parent57da003c4869b7f5be075caaa6133ce6e6dce42a (diff)
downloadgsoc2013-evolution-d09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7.tar
gsoc2013-evolution-d09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7.tar.gz
gsoc2013-evolution-d09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7.tar.bz2
gsoc2013-evolution-d09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7.tar.lz
gsoc2013-evolution-d09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7.tar.xz
gsoc2013-evolution-d09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7.tar.zst
gsoc2013-evolution-d09867f70ab6fcd4e8bc93e4ebc2b6f7383b5bb7.zip
Fix few memory leaks
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-session.c3
-rw-r--r--mail/em-folder-tree.c14
-rw-r--r--mail/em-folder-utils.c3
3 files changed, 17 insertions, 3 deletions
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 061311c820..6b38d707da 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -1258,6 +1258,9 @@ e_mail_session_uri_to_folder_sync (EMailSession *session,
mail_folder_cache_note_folder (folder_cache, folder);
}
+ g_free (folder_name);
+ g_object_unref (store);
+
return folder;
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 46f3fc82ba..8284be42f3 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -916,10 +916,14 @@ folder_tree_finalize (GObject *object)
priv->select_uris,
(GFunc) folder_tree_free_select_uri, NULL);
g_slist_free (priv->select_uris);
- g_hash_table_destroy (priv->select_uris_table);
priv->select_uris = NULL;
}
+ if (priv->select_uris_table) {
+ g_hash_table_destroy (priv->select_uris_table);
+ priv->select_uris_table = NULL;
+ }
+
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -2052,6 +2056,7 @@ folder_tree_drop_async__desc (struct _DragDataReceivedAsync *m)
if (m->info == DND_DROP_TYPE_FOLDER) {
gchar *folder_name = NULL;
+ gchar *res;
e_mail_folder_uri_parse (
CAMEL_SESSION (m->session),
@@ -2059,11 +2064,14 @@ folder_tree_drop_async__desc (struct _DragDataReceivedAsync *m)
g_return_val_if_fail (folder_name != NULL, NULL);
if (m->move)
- return g_strdup_printf (
+ res = g_strdup_printf (
_("Moving folder %s"), folder_name);
else
- return g_strdup_printf (
+ res = g_strdup_printf (
_("Copying folder %s"), folder_name);
+ g_free (folder_name);
+
+ return res;
} else {
if (m->move)
return g_strdup_printf (
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 63931fba6d..e5a3543fdc 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -398,6 +398,9 @@ fail:
g_object_unref (cfd->source_store);
g_free (cfd->source_folder_name);
g_free (cfd);
+
+ if (tostore)
+ g_object_unref (tostore);
g_free (tobase);
}