aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/eab-contact-display.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-01-04 21:53:21 +0800
committerMilan Crha <mcrha@redhat.com>2012-01-04 21:54:17 +0800
commitef8832bb8035edaad77749413afc110e9b8ea01e (patch)
tree921761e1f057b33efccf0ecfa676504064c775f1 /addressbook/gui/widgets/eab-contact-display.c
parent064d9187ab85ad1987b3cd0440fec33b6254ac20 (diff)
downloadgsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar.gz
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar.bz2
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar.lz
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar.xz
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.tar.zst
gsoc2013-evolution-ef8832bb8035edaad77749413afc110e9b8ea01e.zip
Bug #665036 - Memory leaks spot in Contacts view
Diffstat (limited to 'addressbook/gui/widgets/eab-contact-display.c')
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index d428f8ed77..44935c4ca9 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -203,13 +203,16 @@ render_address_link (GString *buffer,
adr = e_contact_get (contact, map_type);
if (adr &&
(adr->street || adr->locality || adr->region || adr->country)) {
+ gchar *escaped;
if (adr->street && *adr->street) g_string_append_printf (link, "%s, ", adr->street);
if (adr->locality && *adr->locality) g_string_append_printf (link, "%s, ", adr->locality);
if (adr->region && *adr->region) g_string_append_printf (link, "%s, ", adr->region);
if (adr->country && *adr->country) g_string_append_printf (link, "%s", adr->country);
- g_string_assign (link, g_uri_escape_string (link->str, NULL, TRUE));
+ escaped = g_uri_escape_string (link->str, NULL, TRUE);
+ g_string_assign (link, escaped);
+ g_free (escaped);
g_string_prepend (link, "<a href=\"http://maps.google.com?q=");
g_string_append_printf (link, "\">%s</a>", _("Open map"));