[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Sat Jul 16 16:38:23 UTC 2016


The branch master has been updated
       via  563c1ec61848073e3739dd126cf1950e338c820d (commit)
      from  28e90f69fbcdcd3c06359a53adceb2dbdfaba614 (commit)


- Log -----------------------------------------------------------------
commit 563c1ec61848073e3739dd126cf1950e338c820d
Author: Miroslav Franc <mfranc at gmx.com>
Date:   Thu Jul 14 17:14:08 2016 +0200

    fix memory leaks
    
    Reviewed-by: Kurt Roeckx <kurt at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1313)

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

Summary of changes:
 crypto/ec/ecp_mont.c | 1 +
 ssl/ssl_rsa.c        | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/crypto/ec/ecp_mont.c b/crypto/ec/ecp_mont.c
index a9c6040..994cc1d 100644
--- a/crypto/ec/ecp_mont.c
+++ b/crypto/ec/ecp_mont.c
@@ -178,6 +178,7 @@ int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p,
     }
 
  err:
+    BN_free(one);
     BN_CTX_free(new_ctx);
     BN_MONT_CTX_free(mont);
     return ret;
diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c
index aad65ea..bb4e872 100644
--- a/ssl/ssl_rsa.c
+++ b/ssl/ssl_rsa.c
@@ -110,6 +110,7 @@ int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa)
     RSA_up_ref(rsa);
     if (EVP_PKEY_assign_RSA(pkey, rsa) <= 0) {
         RSA_free(rsa);
+        EVP_PKEY_free(pkey);
         return 0;
     }
 
@@ -452,6 +453,7 @@ int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
     RSA_up_ref(rsa);
     if (EVP_PKEY_assign_RSA(pkey, rsa) <= 0) {
         RSA_free(rsa);
+        EVP_PKEY_free(pkey);
         return 0;
     }
 


More information about the openssl-commits mailing list