aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-backend.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-10-20 16:16:45 +0800
committerMilan Crha <mcrha@redhat.com>2011-10-20 16:16:45 +0800
commit31babe7961a6ef93419970a6d10c8843b671b466 (patch)
treed488d393207adb85aa5d9c8dcc83726df93f34ca /mail/e-mail-backend.c
parentfbce8fba0c29ccd40e8952600532c75d6a9df476 (diff)
downloadgsoc2013-evolution-31babe7961a6ef93419970a6d10c8843b671b466.tar.gz
gsoc2013-evolution-31babe7961a6ef93419970a6d10c8843b671b466.tar.zst
gsoc2013-evolution-31babe7961a6ef93419970a6d10c8843b671b466.zip
Bug #527614 - Valgrind shows a nice amount of lost memory
Diffstat (limited to 'mail/e-mail-backend.c')
-rw-r--r--mail/e-mail-backend.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index cb91339503..be2f94eeb9 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -544,7 +544,6 @@ mail_backend_folder_changed_cb (MailFolderCache *folder_cache,
const gchar *msg_subject,
EMailBackend *mail_backend)
{
- CamelFolder *folder = NULL;
EMEvent *event = em_event_peek ();
EMEventTargetFolder *target;
EMFolderTreeModel *model;
@@ -554,11 +553,15 @@ mail_backend_folder_changed_cb (MailFolderCache *folder_cache,
folder_uri = e_mail_folder_uri_build (store, folder_name);
- if (mail_folder_cache_get_folder_from_uri (
- folder_cache, folder_uri, &folder))
- if (folder && !mail_folder_cache_get_folder_info_flags (
- folder_cache, folder, &flags))
- g_return_if_reached ();
+ if (folder_uri) {
+ CamelFolder *folder = NULL;
+
+ if (mail_folder_cache_get_folder_from_uri (folder_cache, folder_uri, &folder))
+ if (folder && !mail_folder_cache_get_folder_info_flags (folder_cache, folder, &flags))
+ g_return_if_reached ();
+ if (folder)
+ g_object_unref (folder);
+ }
g_free (folder_uri);