aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-François Rameau <jframeau@cvs.gnome.org>2006-02-03 01:11:16 +0800
committerJean-François Rameau <jframeau@src.gnome.org>2006-02-03 01:11:16 +0800
commit2d89547a741b0b2991c36e4ae86a9cd7cc36985c (patch)
tree2b554513562973abe39aacf0f4cc70396d589df9 /lib
parent1300f32c7260ec273057b631e9ab497501eb7e92 (diff)
downloadgsoc2013-epiphany-2d89547a741b0b2991c36e4ae86a9cd7cc36985c.tar
gsoc2013-epiphany-2d89547a741b0b2991c36e4ae86a9cd7cc36985c.tar.gz
gsoc2013-epiphany-2d89547a741b0b2991c36e4ae86a9cd7cc36985c.tar.bz2
gsoc2013-epiphany-2d89547a741b0b2991c36e4ae86a9cd7cc36985c.tar.lz
gsoc2013-epiphany-2d89547a741b0b2991c36e4ae86a9cd7cc36985c.tar.xz
gsoc2013-epiphany-2d89547a741b0b2991c36e4ae86a9cd7cc36985c.tar.zst
gsoc2013-epiphany-2d89547a741b0b2991c36e4ae86a9cd7cc36985c.zip
Fix some memory leaks.
2006-02-02 Jean-François Rameau <jframeau@cvs.gnome.org> * lib/egg/egg-editable-toolbar.c: (toolbar_visibility_refresh): * src/bookmarks/ephy-topics-entry.c: (update_database): Fix some memory leaks.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 532debb1d..e7deb4129 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -794,15 +794,23 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar)
g_value_init (&value, G_TYPE_STRING);
g_object_get_property (G_OBJECT (action), "label", &value);
name = g_value_get_string (&value);
- if (name == NULL) continue;
-
+ if (name == NULL)
+ {
+ g_value_unset (&value);
+ continue;
+ }
k += g_utf8_strlen (name, -1) + 2;
if (j > 0)
{
g_string_append (string, ", ");
- if (k > 25) break;
+ if (k > 25)
+ {
+ g_value_unset (&value);
+ break;
+ }
}
g_string_append (string, name);
+ g_value_unset (&value);
}
if (j < n_items)
{