commit 7e51f51b5992a4d6c5821c1c23032b5ae9a1ca6c
parent 104cf039b750ae9f7d401cb7e0288a31776aa1cd
Author: wwp <subscript@free.fr>
Date: Tue, 28 Sep 2021 14:27:11 +0200
Fix CID 1491076 and 1491352: resource leaks.
Diffstat:
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;