Fix memory leak.

This commit is contained in:
Ben Laurie 2012-06-11 09:23:38 +00:00
parent e51ec51af9
commit 3c56d65a41
2 changed files with 9 additions and 0 deletions

View File

@ -3036,6 +3036,13 @@ void ssl3_clear(SSL *s)
s->s3->tmp.ecdh = NULL;
}
#endif
#ifndef OPENSSL_NO_TLSEXT
if (s->s3->tlsext_authz_client_types != NULL)
{
OPENSSL_free(s->s3->tlsext_authz_client_types);
s->s3->tlsext_authz_client_types = NULL;
}
#endif
rp = s->s3->rbuf.buf;
wp = s->s3->wbuf.buf;

View File

@ -1781,6 +1781,8 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char
if (!s->hit)
{
size_t i;
if (s->s3->tlsext_authz_client_types != NULL)
OPENSSL_free(s->s3->tlsext_authz_client_types);
s->s3->tlsext_authz_client_types =
OPENSSL_malloc(server_authz_dataformatlist_length);
if (!s->s3->tlsext_authz_client_types)