[Commits] [SCM] claws branch, master, updated. 3.18.0-193-gc0b3a6d5b

wwp at claws-mail.org wwp at claws-mail.org
Tue Sep 28 17:13:18 CEST 2021


The branch, master has been updated
       via  c0b3a6d5baa43933e88a637f0a4d2298b50b9b41 (commit)
      from  f930692abee77f95f533f41959bbbfbf1129a78c (commit)

Summary of changes:
 src/plugins/clamd/clamav_plugin.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit c0b3a6d5baa43933e88a637f0a4d2298b50b9b41
Author: wwp <subscript at free.fr>
Date:   Tue Sep 28 17:13:07 2021 +0200

    Fix CID 1491066: resource leak.

diff --git a/src/plugins/clamd/clamav_plugin.c b/src/plugins/clamd/clamav_plugin.c
index b49548022..ef650e79c 100644
--- a/src/plugins/clamd/clamav_plugin.c
+++ b/src/plugins/clamd/clamav_plugin.c
@@ -86,7 +86,7 @@ static gboolean scan_func(GNode *node, gpointer data)
 	response buf;
 	int max;
 	GStatBuf info;
-	gchar* msg;
+	gchar* msg, *name;
 
 	outfile = procmime_get_tmp_file_name(mimeinfo);
 	if (procmime_get_part(outfile, mimeinfo) < 0)
@@ -116,8 +116,10 @@ static gboolean scan_func(GNode *node, gpointer data)
 						}
 						break;
 					case VIRUS: 
+						name = clamd_get_virus_name(buf.msg);
 						msg = g_strconcat(_("Detected %s virus."),
-							clamd_get_virus_name(buf.msg), NULL);
+							name, NULL);
+						g_free(name);
 						g_warning("%s", msg);
 						debug_print("no_recv: %d\n", prefs_common_get_prefs()->no_recv_err_panel);
 						if (prefs_common_get_prefs()->no_recv_err_panel) {

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list