diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-06-07 07:00:38 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-06-07 07:00:38 +0800 |
commit | cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae (patch) | |
tree | aa44f662c6b670985459e7b3e3e4b333f9084fe9 | |
parent | f6d5d88afad2d84ae8be385a1d63c8858cb78b5c (diff) | |
download | gsoc2013-epiphany-cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae.tar gsoc2013-epiphany-cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae.tar.gz gsoc2013-epiphany-cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae.tar.bz2 gsoc2013-epiphany-cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae.tar.lz gsoc2013-epiphany-cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae.tar.xz gsoc2013-epiphany-cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae.tar.zst gsoc2013-epiphany-cda0a0c5e93e986a83bfeb27c2faf48fa3f3d1ae.zip |
Fix mem leak.
2003-06-07 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-dialog.c: (impl_get_value):
* src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_add):
Fix mem leak.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/ephy-dialog.c | 5 | ||||
-rw-r--r-- | src/bookmarks/ephy-new-bookmark.c | 2 |
3 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2003-06-07 Christian Persch <chpe@cvs.gnome.org> + + * lib/ephy-dialog.c: (impl_get_value): + * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_add): + + Fix mem leak. + 2003-06-06 Piers Cornwell <piersc@cogs.susx.ac.uk> * embed/mozilla/mozilla-embed-single.cpp: diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c index 8bdfc5330..9f484704c 100644 --- a/lib/ephy-dialog.c +++ b/lib/ephy-dialog.c @@ -824,9 +824,10 @@ impl_get_value (EphyDialog *dialog, } else if (GTK_IS_EDITABLE (widget)) { + gchar *text = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, gtk_editable_get_chars - (GTK_EDITABLE (widget), 0, -1)); + g_value_set_string (value, text); + g_free (text); } else if (GTK_IS_OPTION_MENU (widget)) { diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c index 05dcae622..69e190ebc 100644 --- a/src/bookmarks/ephy-new-bookmark.c +++ b/src/bookmarks/ephy-new-bookmark.c @@ -174,6 +174,8 @@ ephy_new_bookmark_add (EphyNewBookmark *new_bookmark) new_bookmark->priv->icon); } + g_free (title); + ephy_bookmarks_save (new_bookmark->priv->bookmarks); } |