diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-03-27 16:10:50 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-03-27 16:10:50 +0000 |
commit | bc5ec653ba65fedb1619c8182088497de8a97a70 (patch) | |
tree | 164660be2d496dd71d4d282128bbf354cc0a673c /ssl | |
parent | 1f44dac24d1cb752b1a06be9091bb03a88a8598e (diff) |
Fix memory leak with client auth.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/t1_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index db9a14870c..ed3d07a0e0 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3606,6 +3606,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) { @@ -3662,6 +3667,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; |