[Commits] [SCM] claws branch, master, updated. 3.17.3-152-g984d5ed

ticho at claws-mail.org ticho at claws-mail.org
Tue Apr 23 22:31:39 CEST 2019


The branch, master has been updated
       via  984d5ed3aca6d87c6e42196ae8ed71b936f6e980 (commit)
      from  d4d8239c2fb85aa79bb348cc62ee78a57f187136 (commit)

Summary of changes:
 src/plugins/rssyl/rssyl_add_item.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 984d5ed3aca6d87c6e42196ae8ed71b936f6e980
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Apr 23 22:31:31 2019 +0200

    Fix a memory leak in rssyl_add_item()

diff --git a/src/plugins/rssyl/rssyl_add_item.c b/src/plugins/rssyl/rssyl_add_item.c
index 4123008..2bff270 100644
--- a/src/plugins/rssyl/rssyl_add_item.c
+++ b/src/plugins/rssyl/rssyl_add_item.c
@@ -379,6 +379,7 @@ void rssyl_add_item(RFolderItem *ritem, FeedItem *feed_item)
 						atoi(pathbasename));
 		g_free(pathbasename);
 		oldperm_flags = msginfo->flags.perm_flags;
+		procmsg_msginfo_free(&msginfo);
 
 		ritem->items = g_slist_remove(ritem->items, old_item);
 		if (g_unlink(ctx->path) != 0) {
@@ -575,9 +576,11 @@ void rssyl_add_item(RFolderItem *ritem, FeedItem *feed_item)
 	 * doesn't want to see it unread because of the change. */
 	if (dif != EXISTS_NEW) {
 		if (!(oldperm_flags & MSG_UNREAD) && (ritem->silent_update == 2
-				|| (ritem->silent_update == 1 && dif == EXISTS_CHANGED_TEXTONLY)))
-			procmsg_msginfo_unset_flags(
-					folder_item_get_msginfo((FolderItem *)ritem, d), MSG_NEW | MSG_UNREAD, 0);
+				|| (ritem->silent_update == 1 && dif == EXISTS_CHANGED_TEXTONLY))) {
+			msginfo = folder_item_get_msginfo((FolderItem *)ritem, d);
+			procmsg_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0);
+			procmsg_msginfo_free(&msginfo);
+		}
 	}
 
 	debug_print("RSSyl: folder_item_add_msg(): %d\n", d);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list