[epiphany] Plug g_file_new_for_path leaks
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Plug g_file_new_for_path leaks
- Date: Wed, 13 Oct 2010 14:41:00 +0000 (UTC)
commit 8b4c3eb738cdd9867db3ed941743fab493e3118e
Author: Xan Lopez <xan gnome org>
Date: Mon Oct 11 20:59:27 2010 +0900
Plug g_file_new_for_path leaks
lib/ephy-file-helpers.c | 3 ++-
src/bookmarks/ephy-bookmarks-export.c | 8 ++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 1a36cb4..220951f 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 a6a1628..1c40dca 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]