[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Wed Mar 9 16:26:03 UTC 2016


The branch master has been updated
       via  aeb5b95576025d651c4941e7a5c157351094de84 (commit)
      from  b7aacc3ac33c9c239e8187a3ad595afb8e49ce79 (commit)


- Log -----------------------------------------------------------------
commit aeb5b95576025d651c4941e7a5c157351094de84
Author: Todd Short <tshort at akamai.com>
Date:   Wed Mar 9 10:01:43 2016 -0500

    Fix locking in ssl_cert_dup()
    
    Properly check the return value of CRYPTO_THREAD_lock_new()
    
    Signed-off-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>

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

Summary of changes:
 ssl/ssl_cert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 21cfb96..8915531 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -190,7 +190,7 @@ CERT *ssl_cert_dup(CERT *cert)
     ret->references = 1;
     ret->key = &ret->pkeys[cert->key - cert->pkeys];
     ret->lock = CRYPTO_THREAD_lock_new();
-    if (ret == NULL) {
+    if (ret->lock == NULL) {
         SSLerr(SSL_F_SSL_CERT_DUP, ERR_R_MALLOC_FAILURE);
         OPENSSL_free(ret);
         return NULL;


More information about the openssl-commits mailing list