talons

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

commit 415e7de0d1587ea0fe323b9eadbbc2f163eb97d2
parent d8833eba98a94e586c755ac1d39d5ca444fa9cef
Author: wwp <subscript@free.fr>
Date:   Tue, 28 Sep 2021 14:27:11 +0200

Fix CID 1491076 and 1491352: resource leaks.

Diffstat:
Msrc/plugins/bogofilter/bogofilter.c | 1+
Msrc/plugins/bsfilter/bsfilter.c | 6++++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/plugins/bogofilter/bogofilter.c b/src/plugins/bogofilter/bogofilter.c @@ -730,6 +730,7 @@ int bogofilter_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam) return -1; } + /* process *either* a msginfo or a msglist */ if (msginfo) { file = procmsg_get_message_file(msginfo); if (file == NULL) { diff --git a/src/plugins/bsfilter/bsfilter.c b/src/plugins/bsfilter/bsfilter.c @@ -1,7 +1,7 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2009 Colin Leroy <colin@colino.net> and - * the Claws Mail team + * Copyright (C) 1999-2021 the Claws Mail team and + * Colin Leroy <colin@colino.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -172,6 +172,7 @@ static void bsfilter_do_filter(BsFilterData *data) #endif status = execute_command_line(classify, FALSE, claws_get_startup_dir()); + g_free(classify); } if (config.whitelist_ab) @@ -458,6 +459,7 @@ int bsfilter_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam) if (msginfo == NULL && msglist == NULL) { return -1; } + /* process *either* a msginfo or a msglist */ if (msginfo != NULL && msglist == NULL) { msglist = g_slist_append(NULL, msginfo); free_list = TRUE;