aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-notifiers.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-05-27 04:57:06 +0800
committerChristian Persch <chpe@src.gnome.org>2003-05-27 04:57:06 +0800
commitd94a3584faf8e3a3da1ffd3361c90cae4c78611a (patch)
treea92bb741206966f0a8dd4d40912cfa5e684b08d0 /embed/mozilla/mozilla-notifiers.cpp
parent5ff8f7cb898f02ddf1f2dfe0370e90c1c8d3e061 (diff)
downloadgsoc2013-epiphany-d94a3584faf8e3a3da1ffd3361c90cae4c78611a.tar
gsoc2013-epiphany-d94a3584faf8e3a3da1ffd3361c90cae4c78611a.tar.gz
gsoc2013-epiphany-d94a3584faf8e3a3da1ffd3361c90cae4c78611a.tar.bz2
gsoc2013-epiphany-d94a3584faf8e3a3da1ffd3361c90cae4c78611a.tar.lz
gsoc2013-epiphany-d94a3584faf8e3a3da1ffd3361c90cae4c78611a.tar.xz
gsoc2013-epiphany-d94a3584faf8e3a3da1ffd3361c90cae4c78611a.tar.zst
gsoc2013-epiphany-d94a3584faf8e3a3da1ffd3361c90cae4c78611a.zip
Fix mem leak.
2003-05-26 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/mozilla-notifiers.c: (mozilla_language_notifier): Fix mem leak.
Diffstat (limited to 'embed/mozilla/mozilla-notifiers.cpp')
-rw-r--r--embed/mozilla/mozilla-notifiers.cpp7
1 files changed, 6 insertions, 1 deletions
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[] =