[openssl-commits] [openssl] OpenSSL source code branch master updated. 41bf25013032da0eeb111ce3c8fc0946c0e61c41

Matt Caswell matt at openssl.org
Mon Dec 8 11:53:41 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, master has been updated
       via  41bf25013032da0eeb111ce3c8fc0946c0e61c41 (commit)
       via  76e6509085ea96df0ca542568ee2596343711307 (commit)
      from  7bca0a1db5f0fc2d2c671eddac19e9e92075a5f4 (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 41bf25013032da0eeb111ce3c8fc0946c0e61c41
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>

commit 76e6509085ea96df0ca542568ee2596343711307
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>

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

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 f95f9c7..a2eebbb 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -294,6 +294,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 743204c..a4d565f 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -417,13 +417,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