aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-14 02:08:55 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-14 02:08:55 +0800
commit5009179262c9faf39857e7bca14ad718b84ba51c (patch)
tree2243854b59c6cdb8aa0b22a305b68ced7493d8ef /embed
parentd4d88cfb05a492697310ef53da921ce2c95cef0a (diff)
downloadgsoc2013-epiphany-5009179262c9faf39857e7bca14ad718b84ba51c.tar
gsoc2013-epiphany-5009179262c9faf39857e7bca14ad718b84ba51c.tar.gz
gsoc2013-epiphany-5009179262c9faf39857e7bca14ad718b84ba51c.tar.bz2
gsoc2013-epiphany-5009179262c9faf39857e7bca14ad718b84ba51c.tar.lz
gsoc2013-epiphany-5009179262c9faf39857e7bca14ad718b84ba51c.tar.xz
gsoc2013-epiphany-5009179262c9faf39857e7bca14ad718b84ba51c.tar.zst
gsoc2013-epiphany-5009179262c9faf39857e7bca14ad718b84ba51c.zip
Fix leaks. Dont truncate utf8 strings.
2003-04-13 Marco Pesenti Gritti <marco@it.gnome.org> * embed/mozilla/mozilla-embed.cpp: * src/ephy-tab.c: (ephy_tab_init), (ephy_tab_finalize), (ephy_tab_set_favicon), (ephy_tab_favicon_cache_changed_cb), (ephy_tab_link_message_cb), (ephy_tab_location_cb), (ephy_tab_get_status_message): Fix leaks. Dont truncate utf8 strings.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/mozilla-embed.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 78304cd15..0fdcb8e7a 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -1064,13 +1064,7 @@ impl_get_security_level (EphyEmbed *embed,
if (tooltip)
{
- const nsString &string = nsString(tooltip);
- char *tmp;
- tmp = ToNewCString (string);
-
- *description = g_strdup (tmp);
-
- nsMemory::Free (tmp);
+ *description = g_strdup (NS_ConvertUCS2toUTF8(tooltip).get());
}
}
@@ -1284,7 +1278,7 @@ mozilla_embed_link_message_cb (GtkMozEmbed *embed,
*getter_Copies(message) = gtk_moz_embed_get_link_message_unichar (embed);
g_signal_emit_by_name (membed, "ge_link_message",
- g_strdup(NS_ConvertUCS2toUTF8(message).get()));
+ NS_ConvertUCS2toUTF8(message).get());
}
static void
@@ -1296,7 +1290,7 @@ mozilla_embed_js_status_cb (GtkMozEmbed *embed,
*getter_Copies(status) = gtk_moz_embed_get_js_status_unichar (embed);
g_signal_emit_by_name (membed, "ge_js_status",
- g_strdup(NS_ConvertUCS2toUTF8(status).get()));
+ NS_ConvertUCS2toUTF8(status).get());
}
static void