diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-26 00:35:01 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-26 00:35:01 +0800 |
commit | 576c5d0e7560c4ae9944677c04952ca1d6ecfa0f (patch) | |
tree | bf8c634251e95c8333b15a50adb5d6ebbeb0273f /src/bookmarks | |
parent | 0ac06564fe20c1e28724fed98411edb1de954639 (diff) | |
download | gsoc2013-epiphany-576c5d0e7560c4ae9944677c04952ca1d6ecfa0f.tar gsoc2013-epiphany-576c5d0e7560c4ae9944677c04952ca1d6ecfa0f.tar.gz gsoc2013-epiphany-576c5d0e7560c4ae9944677c04952ca1d6ecfa0f.tar.bz2 gsoc2013-epiphany-576c5d0e7560c4ae9944677c04952ca1d6ecfa0f.tar.lz gsoc2013-epiphany-576c5d0e7560c4ae9944677c04952ca1d6ecfa0f.tar.xz gsoc2013-epiphany-576c5d0e7560c4ae9944677c04952ca1d6ecfa0f.tar.zst gsoc2013-epiphany-576c5d0e7560c4ae9944677c04952ca1d6ecfa0f.zip |
Fix mem leak.
2004-01-25 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmarks-export.c:
(ephy_bookmarks_export_rdf):
Fix mem leak.
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-export.c | 14 |
1 files changed, 5 insertions, 9 deletions
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 */ |