commit 4b44092934607b489f34000e3906f503ab41d65d
parent a800245115984003e38a33aadd1a2e10d7f25b7c
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Sun, 16 Jul 2017 19:31:25 +0200
Pgpmime: fix two memory leak in MIME boundary handling.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c
@@ -501,6 +501,7 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
/* read temporary file into memory */
textstr = get_canonical_content(fp, boundary);
+ g_free(boundary);
fclose(fp);
gpgme_data_new_from_mem(&gpgtext, textstr, (size_t)strlen(textstr), 0);
@@ -700,6 +701,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
/* read temporary file into memory */
textstr = get_canonical_content(fp, boundary);
+ g_free(boundary);
fclose(fp);
/* encrypt data */