diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-export.c | 14 |
2 files changed, 12 insertions, 9 deletions
@@ -1,3 +1,10 @@ +2004-01-25 Christian Persch <chpe@cvs.gnome.org> + + * src/bookmarks/ephy-bookmarks-export.c: + (ephy_bookmarks_export_rdf): + + Fix mem leak. + 2004-01-25 Adam Hooper <adamh@cvs.gnome.org> * lib/ephy-file-helpers.c: (ephy_file_tmp_dir): diff --git a/src/bookmarks/ephy-bookmarks-export.c b/src/bookmarks/ephy-bookmarks-export.c index 42bc28783..df7537abf 100644 --- a/src/bookmarks/ephy-bookmarks-export.c +++ b/src/bookmarks/ephy-bookmarks-export.c @@ -150,6 +150,9 @@ ephy_bookmarks_export_rdf (EphyBookmarks *bookmarks, kid = g_ptr_array_index (children, i); + ret = xmlTextWriterStartElementNS (writer, "rdf", "li", NULL); + if (ret < 0) break; + smart_url = ephy_node_has_child (smart_bmks, kid); url = ephy_node_get_property_string (kid, EPHY_NODE_BMK_PROP_LOCATION); @@ -170,16 +173,9 @@ ephy_bookmarks_export_rdf (EphyBookmarks *bookmarks, } } - if (link == NULL) - { - link = g_strdup (url); - } - - ret = xmlTextWriterStartElementNS (writer, "rdf", "li", NULL); - if (ret < 0) break; - ret = xmlTextWriterWriteAttributeNS - (writer, "rdf", "about", NULL, link); + (writer, "rdf", "about", NULL, link ? link : url); + g_free (link); if (ret < 0) break; ret = xmlTextWriterEndElement (writer); /* rdf:li */ |