aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-export.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-26 00:35:01 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-26 00:35:01 +0800
commit576c5d0e7560c4ae9944677c04952ca1d6ecfa0f (patch)
treebf8c634251e95c8333b15a50adb5d6ebbeb0273f /src/bookmarks/ephy-bookmarks-export.c
parent0ac06564fe20c1e28724fed98411edb1de954639 (diff)
downloadgsoc2013-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/ephy-bookmarks-export.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-export.c14
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 */