talons

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

commit 18bd82c8d833626d0edf033c9b313cfe7efe9a6e
parent 0c330bd1e1f5ce77e160f46f06ba3431bbc5d921
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed, 24 Apr 2019 00:03:27 +0200

Fix memory leak in smime_sign() and forgotten removal of a temporary file in smime_encrypt()

Diffstat:
Msrc/plugins/smime/smime.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/plugins/smime/smime.c b/src/plugins/smime/smime.c @@ -691,6 +691,7 @@ gboolean smime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *from g_hash_table_insert(newinfo->dispositionparameters, g_strdup("filename"), g_strdup("smime.p7s")); newinfo->data.mem = g_malloc(len + 1); + newinfo->tmp = TRUE; g_memmove(newinfo->data.mem, real_content, len); newinfo->data.mem[len] = '\0'; newinfo->encoding_type = ENC_BASE64; @@ -869,6 +870,7 @@ gboolean smime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data) encmultipart->content = MIMECONTENT_FILE; encmultipart->data.filename = tmpfile; + encmultipart->tmp = TRUE; procmime_encode_content(encmultipart, ENC_BASE64); g_free(enccontent);