From: Dr. Stephen Henson Date: Thu, 27 Mar 2014 16:10:50 +0000 (+0000) Subject: Fix memory leak with client auth. X-Git-Tag: OpenSSL_1_0_2-beta2~273 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bc5ec653ba65fedb1619c8182088497de8a97a70;p=oweals%2Fopenssl.git Fix memory leak with client auth. --- 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;