talons

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

commit ee207f846267ef356947b5a764e109bd11b9667d
parent c0b3a6d5baa43933e88a637f0a4d2298b50b9b41
Author: wwp <subscript@free.fr>
Date:   Tue, 28 Sep 2021 17:16:57 +0200

Fix CID 1491146: resource leak.

Diffstat:
Msrc/plugins/attachwarner/attachwarner.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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; } /**