[Commits] [SCM] claws branch, master, updated. 3.18.0-195-gda9933b20
wwp at claws-mail.org
wwp at claws-mail.org
Tue Sep 28 17:40:24 CEST 2021
The branch, master has been updated
via da9933b20717015a7053fde0637550d6f33a2ea8 (commit)
from ee207f846267ef356947b5a764e109bd11b9667d (commit)
Summary of changes:
src/plugins/pgpmime/pgpmime.c | 9 +++++++++
1 file changed, 9 insertions(+)
- Log -----------------------------------------------------------------
commit da9933b20717015a7053fde0637550d6f33a2ea8
Author: wwp <subscript at free.fr>
Date: Tue Sep 28 17:40:12 2021 +0200
Fix CID 1492195, 1491196, 1491158 and 1491081: resource leaks.
diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c
index e9cb47998..618bb6fa2 100644
--- a/src/plugins/pgpmime/pgpmime.c
+++ b/src/plugins/pgpmime/pgpmime.c
@@ -72,6 +72,7 @@ static PrivacyDataPGP *pgpmime_new_privacydata()
data->sigstatus = NULL;
if ((err = gpgme_new(&data->ctx)) != GPG_ERR_NO_ERROR) {
g_warning("couldn't initialize GPG context: %s", gpgme_strerror(err));
+ g_free(data);
return NULL;
}
@@ -494,6 +495,7 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
if (fp == NULL) {
perror("my_tmpfile");
privacy_set_error(_("Couldn't create temporary file: %s"), g_strerror(errno));
+ g_free(boundary);
return FALSE;
}
procmime_write_mimeinfo(sigmultipart, fp);
@@ -655,6 +657,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
debug_print(("Couldn't initialize GPG context, %s\n"), gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
g_free(kset);
+ g_free(fprs);
return FALSE;
}
i = 0;
@@ -665,6 +668,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
debug_print("can't add key '%s'[%d] (%s)\n", fprs[i],i, gpgme_strerror(err));
privacy_set_error(_("Couldn't add GPG key %s, %s"), fprs[i], gpgme_strerror(err));
g_free(kset);
+ g_free(fprs);
return FALSE;
}
debug_print("found %s at %d\n", fprs[i], i);
@@ -695,6 +699,8 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
perror("my_tmpfile");
privacy_set_error(_("Couldn't create temporary file, %s"), g_strerror(errno));
g_free(kset);
+ g_free(boundary);
+ g_free(fprs);
return FALSE;
}
procmime_write_mimeinfo(encmultipart, fp);
@@ -724,6 +730,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
privacy_set_error(_("Encryption failed, %s"), gpgme_strerror(err));
gpgme_release(ctx);
g_free(enccontent);
+ g_free(fprs);
return FALSE;
}
@@ -753,6 +760,8 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
g_free(enccontent);
gpgme_release(ctx);
+ g_free(fprs);
+
return TRUE;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list