talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

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

RSSyl: Free GError from memory where necessary.

Diffstat:
Msrc/plugins/rssyl/parse822.c | 5++++-
Msrc/plugins/rssyl/rssyl.c | 2++
Msrc/plugins/rssyl/rssyl_deleted.c | 4+++-
3 files changed, 9 insertions(+), 2 deletions(-)

diff --git 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 @@ -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 @@ -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');