aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2010-10-11 19:59:27 +0800
committerXan Lopez <xan@gnome.org>2010-10-13 22:40:28 +0800
commit8b4c3eb738cdd9867db3ed941743fab493e3118e (patch)
tree577d1a3365f1ac079c164408954efd12ddb58932
parentcc56e3e286232da24a6508650b7ef026a494535b (diff)
downloadgsoc2013-epiphany-8b4c3eb738cdd9867db3ed941743fab493e3118e.tar
gsoc2013-epiphany-8b4c3eb738cdd9867db3ed941743fab493e3118e.tar.gz
gsoc2013-epiphany-8b4c3eb738cdd9867db3ed941743fab493e3118e.tar.bz2
gsoc2013-epiphany-8b4c3eb738cdd9867db3ed941743fab493e3118e.tar.lz
gsoc2013-epiphany-8b4c3eb738cdd9867db3ed941743fab493e3118e.tar.xz
gsoc2013-epiphany-8b4c3eb738cdd9867db3ed941743fab493e3118e.tar.zst
gsoc2013-epiphany-8b4c3eb738cdd9867db3ed941743fab493e3118e.zip
Plug g_file_new_for_path leaks
-rw-r--r--lib/ephy-file-helpers.c3
-rw-r--r--src/bookmarks/ephy-bookmarks-export.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 1a36cb457..220951fb3 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -927,7 +927,8 @@ ephy_file_browse_to (GFile *file,
parent,
user_time);
}
-
+
+ g_object_unref (desktop);
g_free (desktop_dir);
return ret;
diff --git a/src/bookmarks/ephy-bookmarks-export.c b/src/bookmarks/ephy-bookmarks-export.c
index a6a162882..1c40dcaf9 100644
--- a/src/bookmarks/ephy-bookmarks-export.c
+++ b/src/bookmarks/ephy-bookmarks-export.c
@@ -43,7 +43,7 @@ sanitise_string (const xmlChar *string)
/* http://www.w3.org/TR/REC-xml/#sec-well-formed :
Character Range
- [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] |
+ [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] |
[#xE000-#xFFFD] | [#x10000-#x10FFFF]
any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
*/
@@ -191,7 +191,7 @@ write_rdf (EphyBookmarks *bookmarks,
(xmlChar *) "http://www.gnome.org/projects/epiphany/");
if (ret < 0) goto out;
- ret = xmlTextWriterStartElement (writer, (xmlChar *) "items");
+ ret = xmlTextWriterStartElement (writer, (xmlChar *) "items");
if (ret < 0) goto out;
ret = xmlTextWriterStartElementNS
@@ -406,6 +406,8 @@ ephy_bookmarks_export_rdf (EphyBookmarks *bookmarks,
writer = xmlNewTextWriterFilename (tmp_file_path, 0);
if (writer == NULL)
{
+ g_object_unref (file);
+ g_object_unref (tmp_file);
g_free (tmp_file);
return;
}
@@ -468,6 +470,8 @@ ephy_bookmarks_export_mozilla (EphyBookmarks *bookmarks,
tmp_file = g_file_new_for_path (tmp_file_path);
ret = write_rdf (bookmarks, tmp_file, writer);
+ g_object_unref (tmp_file);
+
if (ret < 0) goto out;
/* Set up libxml stuff */