[Commits] [SCM] claws branch, master, updated. 3.11.1-135-ga48d94d

ticho at claws-mail.org ticho at claws-mail.org
Tue Jun 16 23:04:59 CEST 2015


The branch, master has been updated
       via  a48d94d8f0c2ea1b4778d1d92c6758433b856c0c (commit)
      from  cb7105cb923b786e1ce1f49c1456db538bae0d87 (commit)

Summary of changes:
 src/plugins/rssyl/parse822.c      |    5 ++++-
 src/plugins/rssyl/rssyl.c         |    2 ++
 src/plugins/rssyl/rssyl_deleted.c |    4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit a48d94d8f0c2ea1b4778d1d92c6758433b856c0c
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Jun 16 23:04:24 2015 +0200

    RSSyl: Free GError from memory where necessary.

diff --git a/src/plugins/rssyl/parse822.c b/src/plugins/rssyl/parse822.c
index 6a700b5..5eadc4a 100644
--- a/src/plugins/rssyl/parse822.c
+++ b/src/plugins/rssyl/parse822.c
@@ -63,8 +63,10 @@ FeedItem *rssyl_parse_folder_item_file(gchar *path)
 
 	g_file_get_contents(path, &contents, NULL, &error);
 
-	if( error )
+	if( error ) {
 		g_warning("GError: '%s'\n", error->message);
+		g_error_free(error);
+	}
 
 	if( contents != NULL ) {
 		lines = strsplit_no_copy(contents, '\n');
@@ -267,6 +269,7 @@ static void rssyl_folder_read_existing_real(RFolderItem *ritem)
 		FILE_OP_ERROR(path, "g_dir_open");
 		debug_print("g_dir_open on \"%s\" failed with error %d (%s)\n",
 				path, error->code, error->message);
+		g_error_free(error);
 		g_free(path);
 		return;
 	}
diff --git a/src/plugins/rssyl/rssyl.c b/src/plugins/rssyl/rssyl.c
index 00a5d37..5983495 100644
--- a/src/plugins/rssyl/rssyl.c
+++ b/src/plugins/rssyl/rssyl.c
@@ -219,6 +219,7 @@ static void rssyl_get_last_num(Folder *folder, FolderItem *item)
 		FILE_OP_ERROR(item->path, "g_dir_open");
 		debug_print("g_dir_open() failed on \"%s\", error %d (%s).\n",
 				path, error->code, error->message);
+		g_error_free(error);
 		g_free(path);
 		return;
 	}
@@ -672,6 +673,7 @@ static gint rssyl_get_num_list(Folder *folder, FolderItem *item,
 		FILE_OP_ERROR(item->path, "opendir");
 		debug_print("g_dir_open() failed on \"%s\", error %d (%s).\n",
 				path, error->code, error->message);
+		g_error_free(error);
 		g_free(path);
 		return -1;
 	}
diff --git a/src/plugins/rssyl/rssyl_deleted.c b/src/plugins/rssyl/rssyl_deleted.c
index 01cb0da..6f3a06e 100644
--- a/src/plugins/rssyl/rssyl_deleted.c
+++ b/src/plugins/rssyl/rssyl_deleted.c
@@ -104,8 +104,10 @@ GSList *rssyl_deleted_update(RFolderItem *ritem)
 
 	g_file_get_contents(deleted_file, &contents, NULL, &error);
 
-	if (error)
+	if (error) {
 		g_warning("GError: '%s'\n", error->message);
+		g_error_free(error);
+	}
 
 	if (contents != NULL) {
 		lines = strsplit_no_copy(contents, '\n');

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list