aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks.c
diff options
context:
space:
mode:
authorOsma Ahvenlampi <oa@iki.fi>2003-05-06 06:37:30 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-06 06:37:30 +0800
commit9902a5b9f55a904589bc7651722445d1bde3a2ef (patch)
treed5ade23b28e1d32d9e66353ca9cd5a738552c69f /src/bookmarks/ephy-bookmarks.c
parentbf389ed5fefee7aeffcf0b44c050fea7a19780bc (diff)
downloadgsoc2013-epiphany-9902a5b9f55a904589bc7651722445d1bde3a2ef.tar
gsoc2013-epiphany-9902a5b9f55a904589bc7651722445d1bde3a2ef.tar.gz
gsoc2013-epiphany-9902a5b9f55a904589bc7651722445d1bde3a2ef.tar.bz2
gsoc2013-epiphany-9902a5b9f55a904589bc7651722445d1bde3a2ef.tar.lz
gsoc2013-epiphany-9902a5b9f55a904589bc7651722445d1bde3a2ef.tar.xz
gsoc2013-epiphany-9902a5b9f55a904589bc7651722445d1bde3a2ef.tar.zst
gsoc2013-epiphany-9902a5b9f55a904589bc7651722445d1bde3a2ef.zip
Fix memory leak while saving bookmarks, and performance problem during
2003-05-04 Osma Ahvenlampi <oa@iki.fi> * src/bookmarks/ephy-bookmarks.c: * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-bookmarks-import.c: * src/bookmarks/ephy-new-bookmark.c: Fix memory leak while saving bookmarks, and performance problem during import.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r--src/bookmarks/ephy-bookmarks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 91c3e9c24..f8eb28469 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -247,6 +247,8 @@ ephy_bookmarks_init_defaults (EphyBookmarks *eb)
id = ephy_bookmarks_get_bookmark_id (eb, default_bookmarks[i].location);
ephy_toolbars_model_add_bookmark (model, FALSE, id);
}
+
+ ephy_bookmarks_save (eb);
}
static gboolean
@@ -280,7 +282,7 @@ ephy_bookmarks_load (EphyBookmarks *eb)
return TRUE;
}
-static void
+void
ephy_bookmarks_save (EphyBookmarks *eb)
{
xmlDocPtr doc;
@@ -326,6 +328,7 @@ ephy_bookmarks_save (EphyBookmarks *eb)
ephy_node_thaw (eb->priv->bookmarks);
xmlSaveFormatFile (eb->priv->xml_file, doc, 1);
+ xmlFreeDoc(doc);
}
static double
@@ -721,7 +724,6 @@ ephy_bookmarks_add (EphyBookmarks *eb,
ephy_node_add_child (eb->priv->notcategorized, bm);
ephy_bookmarks_emit_data_changed (eb);
- ephy_bookmarks_save (eb);
return bm;
}