[openssl-commits] [openssl] OpenSSL source code branch OpenSSL_1_0_2-stable updated. OpenSSL_1_0_2-beta3-98-g6806b69

Matt Caswell matt at openssl.org
Mon Dec 8 11:53:34 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_2-stable has been updated
       via  6806b69084fc0a800cf33787568c517a21ebc2c3 (commit)
       via  9809ab965bfc011302422f01db91a4f6bfccd20c (commit)
      from  bd34823e554706e822ae8990afa9454d94e4ce68 (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 6806b69084fc0a800cf33787568c517a21ebc2c3
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 9809ab965bfc011302422f01db91a4f6bfccd20c
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 3bf6cfe..a4342ba 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 51a0ef7..8f49a6f 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -416,13 +416,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