[Commits] [SCM] claws branch, master, updated. 3.15.0-83-gec4142b

ticho at claws-mail.org ticho at claws-mail.org
Mon Jul 10 00:00:30 CEST 2017


The branch, master has been updated
       via  ec4142bcfbfebb43f437709eef02cfa325012612 (commit)
      from  b15dae8534b483eb497df86b6f5d2295fca497e1 (commit)

Summary of changes:
 src/common/ssl_certificate.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit ec4142bcfbfebb43f437709eef02cfa325012612
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Jul 9 23:58:45 2017 +0200

    Fixed a memory leak when checking TLS certificates.

diff --git a/src/common/ssl_certificate.c b/src/common/ssl_certificate.c
index 28a6f7c..0a1d02b 100644
--- a/src/common/ssl_certificate.c
+++ b/src/common/ssl_certificate.c
@@ -657,15 +657,15 @@ static void ssl_certificate_save_chain(gnutls_x509_crt_t *certs, gint len, const
 		size_t n;
 		unsigned char md[128];	
 		gnutls_x509_crt_t cert = certs[i];
-		gchar *fingerprint;
 
 		if (i == 0) {
 			n = sizeof(md);
 			gnutls_x509_crt_get_fingerprint(cert, GNUTLS_DIG_MD5, md, &n);
-			fingerprint = readable_fingerprint(md, n);
+			gchar *fingerprint = readable_fingerprint(md, n);
 			gchar *buf = g_strdup_printf("%d", port);
 
 			file = get_certificate_chain_path(host, buf, fingerprint);
+			g_free(fingerprint);
 
 			g_free(buf);
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list