From: Dr. Stephen Henson Date: Wed, 4 Jan 2012 14:25:28 +0000 (+0000) Subject: Submitted by: Adam Langley X-Git-Tag: OpenSSL_1_0_1-beta2~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1cb4d65b87ef7eafe6a7f5594276caf976303a78;p=oweals%2Fopenssl.git Submitted by: Adam Langley Reviewed by: steve Fix memory leaks. --- diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index e26226b5a3..eee8de1ab5 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -2291,6 +2291,7 @@ int ssl3_get_client_key_exchange(SSL *s) if (i <= 0) { SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB); + BN_clear_free(pub); goto err; } diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 82d490a94f..4734c37e0a 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1247,6 +1247,12 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in sdata = data; if (dsize > 0) { + if (s->tlsext_ocsp_exts) + { + sk_X509_EXTENSION_pop_free(s->tlsext_ocsp_exts, + X509_EXTENSION_free); + } + s->tlsext_ocsp_exts = d2i_X509_EXTENSIONS(NULL, &sdata, dsize);