aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/mozilla-notifiers.cpp7
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 34dd56edd..d23724c9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-26 Christian Persch <chpe+gnomebugz@stud.uni-saarland.de>
+
+ * embed/mozilla/mozilla-notifiers.c: (mozilla_language_notifier):
+
+ Fix mem leak.
+
2003-05-26 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/ephy-node.c: (callback), (ephy_node_dispose):
diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp
index 1dd53a385..a85620e0b 100644
--- a/embed/mozilla/mozilla-notifiers.cpp
+++ b/embed/mozilla/mozilla-notifiers.cpp
@@ -596,8 +596,10 @@ mozilla_language_notifier(GConfClient *client,
GSList *languages, *l;
GString *result;
- result = g_string_new ("");
languages = eel_gconf_get_string_list (CONF_RENDERING_LANGUAGE);
+ g_return_if_fail (languages != NULL);
+
+ result = g_string_new ("");
for (l = languages; l != NULL; l = l->next)
{
@@ -625,6 +627,9 @@ mozilla_language_notifier(GConfClient *client,
mozilla_prefs_set_string ("intl.accept_languages", result->str);
g_string_free (result, TRUE);
+
+ g_slist_foreach (languages, (GFunc) g_free, NULL);
+ g_slist_free (languages);
}
static char *autodetect_charset_prefs[] =