diff options
-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); } |