aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-12 22:24:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-07-12 22:24:01 +0800
commit9ac3461e48c7d747f36b73d08ace5f2bccda052a (patch)
tree2c9cfa157a363988c98c2a910c55770c469cd0ba /mail
parent43c8c058a9449363d20470cb10889147a4613632 (diff)
downloadgsoc2013-evolution-9ac3461e48c7d747f36b73d08ace5f2bccda052a.tar
gsoc2013-evolution-9ac3461e48c7d747f36b73d08ace5f2bccda052a.tar.gz
gsoc2013-evolution-9ac3461e48c7d747f36b73d08ace5f2bccda052a.tar.bz2
gsoc2013-evolution-9ac3461e48c7d747f36b73d08ace5f2bccda052a.tar.lz
gsoc2013-evolution-9ac3461e48c7d747f36b73d08ace5f2bccda052a.tar.xz
gsoc2013-evolution-9ac3461e48c7d747f36b73d08ace5f2bccda052a.tar.zst
gsoc2013-evolution-9ac3461e48c7d747f36b73d08ace5f2bccda052a.zip
Fix a slight memory leak.
Diffstat (limited to 'mail')
-rw-r--r--mail/mail-send-recv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 95e17ac500..36101e19d0 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -365,6 +365,7 @@ format_url (CamelService *service)
{
CamelProvider *provider;
CamelSettings *settings;
+ gchar *service_name = NULL;
const gchar *display_name;
const gchar *host = NULL;
const gchar *path = NULL;
@@ -386,8 +387,10 @@ format_url (CamelService *service)
/* This should never happen, but if the service has no
* display name, fall back to the generic service name. */
- if (display_name == NULL || *display_name == '\0')
- display_name = camel_service_get_name (service, TRUE);
+ if (display_name == NULL || *display_name == '\0') {
+ service_name = camel_service_get_name (service, TRUE);
+ display_name = service_name;
+ }
if (host != NULL && *host != '\0')
pretty_url = g_markup_printf_escaped (
@@ -399,6 +402,8 @@ format_url (CamelService *service)
pretty_url = g_markup_printf_escaped (
"<b>%s</b>", display_name);
+ g_free (service_name);
+
return pretty_url;
}