[Commits] [SCM] claws branch, master, updated. 3.18.0-194-gee207f846

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


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

Summary of changes:
 src/plugins/attachwarner/attachwarner.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit ee207f846267ef356947b5a764e109bd11b9667d
Author: wwp <subscript at free.fr>
Date:   Tue Sep 28 17:16:57 2021 +0200

    Fix CID 1491146: resource leak.

diff --git a/src/plugins/attachwarner/attachwarner.c b/src/plugins/attachwarner/attachwarner.c
index 8454ae9a8..4c019dfd2 100644
--- a/src/plugins/attachwarner/attachwarner.c
+++ b/src/plugins/attachwarner/attachwarner.c
@@ -190,6 +190,7 @@ static gboolean attwarn_before_send_hook(gpointer source, gpointer data)
 {
 	Compose *compose = (Compose *)source;
 	AttachWarnerMention *mention = NULL;
+	gboolean ret = FALSE; /* continue sending if FALSE */
 
 	debug_print("AttachWarner invoked\n");
 	if (compose->batch)
@@ -221,7 +222,7 @@ static gboolean attwarn_before_send_hook(gpointer source, gpointer data)
 		g_free(message);
 		g_free(bold_text);
 		if (aval != G_ALERTALTERNATE)
-			return TRUE;
+			ret = TRUE;	
 	}
 	if (mention != NULL) {
 		if (mention->context != NULL)
@@ -229,7 +230,7 @@ static gboolean attwarn_before_send_hook(gpointer source, gpointer data)
 		g_free(mention);
 	}
 
-	return FALSE;	/* continue sending */
+	return ret;
 }
 
 /**

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list