talons

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

commit 96b3a87eea02da805c22c5632b867dabb3ed5240
parent d256de076b31e3213819a33a3612442939b10ba9
Author: wwp <subscript@free.fr>
Date:   Sun, 26 Sep 2021 17:08:28 +0200

Fix CID 1491186 resource leaks.

Diffstat:
Msrc/textview.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/textview.c b/src/textview.c @@ -1151,6 +1151,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo) waitpid(pid, pfd, 0); g_unlink(fname); account_sigsep_matchlist_delete(); + conv_code_converter_destroy(conv); return; } } @@ -1181,12 +1182,14 @@ textview_default: if (!tmpfp) { FILE_OP_ERROR(mimeinfo->data.filename, "claws_fopen"); account_sigsep_matchlist_delete(); + conv_code_converter_destroy(conv); return; } if (fseek(tmpfp, mimeinfo->offset, SEEK_SET) < 0) { FILE_OP_ERROR(mimeinfo->data.filename, "fseek"); claws_fclose(tmpfp); account_sigsep_matchlist_delete(); + conv_code_converter_destroy(conv); return; } debug_print("Viewing text content of type: %s (length: %d)\n", mimeinfo->subtype, mimeinfo->length); @@ -1197,6 +1200,7 @@ textview_default: if (textview->stop_loading) { claws_fclose(tmpfp); account_sigsep_matchlist_delete(); + conv_code_converter_destroy(conv); return; } wrote += ftell(tmpfp)-i;