summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-03-27 17:10:50 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-03-27 17:12:59 +0100
commit4563da1d7c53e969e8d092d018795179bb648a7c (patch)
tree9dbecd41abcf62f1aed85b3a08161f3c9a9f0792 /ssl
parentAdd -no_resumption_on_reneg to SSL_CONF. (diff)
downloadopenssl-4563da1d7c53e969e8d092d018795179bb648a7c.tar.xz
openssl-4563da1d7c53e969e8d092d018795179bb648a7c.zip
Fix memory leak with client auth.
(cherry picked from commit bc5ec653ba65fedb1619c8182088497de8a97a70)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/t1_lib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 6c988d1829..31fc70e05e 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -3644,6 +3644,11 @@ static int tls1_set_shared_sigalgs(SSL *s)
TLS_SIGALGS *salgs = NULL;
CERT *c = s->cert;
unsigned int is_suiteb = tls1_suiteb(s);
+ if (c->shared_sigalgs)
+ {
+ OPENSSL_free(c->shared_sigalgs);
+ c->shared_sigalgs = NULL;
+ }
/* If client use client signature algorithms if not NULL */
if (!s->server && c->client_sigalgs && !is_suiteb)
{
@@ -3700,6 +3705,8 @@ int tls1_process_sigalgs(SSL *s, const unsigned char *data, int dsize)
if (!c)
return 0;
+ if (c->peer_sigalgs)
+ OPENSSL_free(c->peer_sigalgs);
c->peer_sigalgs = OPENSSL_malloc(dsize);
if (!c->peer_sigalgs)
return 0;