[openssl-commits] [openssl] OpenSSL source code branch OpenSSL_1_0_0-stable updated. OpenSSL_1_0_0o-40-gec5c25b

Matt Caswell matt at openssl.org
Mon Dec 8 11:53:06 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenSSL source code".

The branch, OpenSSL_1_0_0-stable has been updated
       via  ec5c25b3b46078de5af092b67916140fa9ca147b (commit)
       via  38afaa48ec10d6256179b89639ce07ff57b7fe0d (commit)
      from  954818fe60dc4a4514700d185d79afe6fec72afb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ec5c25b3b46078de5af092b67916140fa9ca147b
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Dec 4 09:56:16 2014 +0000

    Fixed memory leak in the event of a failure of BUF_MEM_grow
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (cherry picked from commit 41bf25013032da0eeb111ce3c8fc0946c0e61c41)

commit 38afaa48ec10d6256179b89639ce07ff57b7fe0d
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Dec 4 09:46:44 2014 +0000

    Fix memory leak in SSL_new if errors occur.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (cherry picked from commit 76e6509085ea96df0ca542568ee2596343711307)

-----------------------------------------------------------------------

Summary of changes:
 ssl/s3_srvr.c |    1 +
 ssl/ssl_lib.c |    8 +-------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 2a56f2b..546d633 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -246,6 +246,7 @@ int ssl3_accept(SSL *s)
 					}
 				if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
 					{
+					BUF_MEM_free(buf);
 					ret= -1;
 					goto end;
 					}
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index ac40c6a..bd8cc68 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -377,13 +377,7 @@ SSL *SSL_new(SSL_CTX *ctx)
 	return(s);
 err:
 	if (s != NULL)
-		{
-		if (s->cert != NULL)
-			ssl_cert_free(s->cert);
-		if (s->ctx != NULL)
-			SSL_CTX_free(s->ctx); /* decrement reference count */
-		OPENSSL_free(s);
-		}
+		SSL_free(s);
 	SSLerr(SSL_F_SSL_NEW,ERR_R_MALLOC_FAILURE);
 	return(NULL);
 	}


hooks/post-receive
-- 
OpenSSL source code


More information about the openssl-commits mailing list