From efb44feef21557283e8c7bc1171d4130594d9444 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 25 Jan 2004 20:08:32 +0000 Subject: Fix mem leak. 2004-01-25 Christian Persch * src/bookmarks/ephy-bookmarks-export.c: (ephy_bookmarks_export_rdf): Fix mem leak. --- src/bookmarks/ephy-bookmarks-export.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/bookmarks/ephy-bookmarks-export.c') diff --git a/src/bookmarks/ephy-bookmarks-export.c b/src/bookmarks/ephy-bookmarks-export.c index df7537abf..1251eebe9 100644 --- a/src/bookmarks/ephy-bookmarks-export.c +++ b/src/bookmarks/ephy-bookmarks-export.c @@ -94,7 +94,11 @@ ephy_bookmarks_export_rdf (EphyBookmarks *bookmarks, /* FIXME: do we want to turn on compression here? */ writer = xmlNewTextWriterFilename (tmp_file, 0); - if (writer == NULL) return; + if (writer == NULL) + { + g_free (tmp_file); + return; + } ret = xmlTextWriterStartDocument (writer, "1.0", NULL, NULL); if (ret < 0) goto out; @@ -274,6 +278,8 @@ out: } } + g_free (tmp_file); + STOP_PROFILER ("Exporting as RDF") LOG ("Exporting as RDF %s.", ret >= 0 ? "succeeded" : "FAILED") -- cgit v1.2.3