talons

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

commit bbe3de93cd452d461ac905bdc22b7be064b73a78
parent ecb3e3e748be5a6e89056d31960abde19fe209bd
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; } /**