[openssl-commits] [openssl] OpenSSL source code branch OpenSSL_1_0_1-stable updated. OpenSSL_1_0_1j-60-gb8b9bcb

Matt Caswell matt at openssl.org
Mon Dec 8 11:53:25 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_1-stable has been updated
       via  b8b9bcb4587f6df315223ae18ec10ecdb5a9dab8 (commit)
       via  be617fbaf89225989c2231f98565c1c47bd22992 (commit)
      from  321ba85899ce7246db3791457c711ad586b6d3f8 (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 b8b9bcb4587f6df315223ae18ec10ecdb5a9dab8
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 be617fbaf89225989c2231f98565c1c47bd22992
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 59ff271..c67f11a 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -286,6 +286,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 f5c8ca9..81f976a 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -383,13 +383,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