projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46063c4
)
Fix bug #3150, "etpan_certificate_check() leaks memory"
author
Colin Leroy
<colin@colino.net>
Mon, 21 Apr 2014 08:01:39 +0000
(10:01 +0200)
committer
Colin Leroy
<colin@colino.net>
Mon, 21 Apr 2014 08:01:39 +0000
(10:01 +0200)
src/etpan/imap-thread.c
patch
|
blob
|
history
diff --git
a/src/etpan/imap-thread.c
b/src/etpan/imap-thread.c
index b71e4d746d55518579bd1d696d3a3d7e91300edb..ad5e3b3ef1c0158c0a784d3c20cdc5396715f6a3 100644
(file)
--- a/
src/etpan/imap-thread.c
+++ b/
src/etpan/imap-thread.c
@@
-536,13
+536,16
@@
static int etpan_certificate_check(const unsigned char *certificate, int len, vo
tmp.size = len;
gnutls_x509_crt_init(&cert);
if (gnutls_x509_crt_import(cert, &tmp, GNUTLS_X509_FMT_DER) < 0) {
+ free(tmp.data);
g_warning("IMAP: can't get cert\n");
return 0;
} else if (ssl_certificate_check(cert, (guint)-1, (gchar *)param->server,
(gushort)param->port) == TRUE) {
+ free(tmp.data);
gnutls_x509_crt_deinit(cert);
return 0;
} else {
+ free(tmp.data);
gnutls_x509_crt_deinit(cert);
return -1;
}