summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-03-26 19:12:25 +0100
committerMatt Caswell <matt@openssl.org>2018-03-27 17:15:24 +0100
commit320a81277e402f393289ae7229b2320324321fb1 (patch)
tree342b0eb948fccb52621e97cce7b69b09c701ca05 /crypto/bn
parent9d5db9c9ab9b9f2f2a5ce9795405e8334cd2ce66 (diff)
Remove some code for a contributor that we cannot find
This removes some code because we cannot trace the original contributor to get their agreement for the licence change (original commit e03ddfae). After this change there will be numerous failures in the test cases until someone rewrites the missing code. All *_free functions should accept a NULL parameter. After this change the following *_free functions will fail if a NULL parameter is passed: BIO_ACCEPT_free() BIO_CONNECT_free() BN_BLINDING_free() BN_CTX_free() BN_MONT_CTX_free() BN_RECP_CTX_free() BUF_MEM_free() COMP_CTX_free() ERR_STATE_free() TXT_DB_free() X509_STORE_free() ssl3_free() ssl_cert_free() SSL_SESSION_free() SSL_free() [skip ci] Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/5757)
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn_blind.c3
-rw-r--r--crypto/bn/bn_ctx.c2
-rw-r--r--crypto/bn/bn_mont.c3
-rw-r--r--crypto/bn/bn_recp.c3
4 files changed, 0 insertions, 11 deletions
diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c
index 006ad6e597..8bd61567e7 100644
--- a/crypto/bn/bn_blind.c
+++ b/crypto/bn/bn_blind.c
@@ -80,9 +80,6 @@ BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod)
void BN_BLINDING_free(BN_BLINDING *r)
{
- if (r == NULL)
- return;
-
BN_free(r->A);
BN_free(r->Ai);
BN_free(r->e);
diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c
index 68c0468743..7202aef326 100644
--- a/crypto/bn/bn_ctx.c
+++ b/crypto/bn/bn_ctx.c
@@ -156,8 +156,6 @@ BN_CTX *BN_CTX_secure_new(void)
void BN_CTX_free(BN_CTX *ctx)
{
- if (ctx == NULL)
- return;
#ifdef BN_CTX_DEBUG
{
BN_POOL_ITEM *pool = ctx->pool.head;
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c
index 6357c60c77..bae7d235bd 100644
--- a/crypto/bn/bn_mont.c
+++ b/crypto/bn/bn_mont.c
@@ -217,9 +217,6 @@ void BN_MONT_CTX_init(BN_MONT_CTX *ctx)
void BN_MONT_CTX_free(BN_MONT_CTX *mont)
{
- if (mont == NULL)
- return;
-
BN_clear_free(&(mont->RR));
BN_clear_free(&(mont->N));
BN_clear_free(&(mont->Ni));
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c
index e873699163..923a9b33d8 100644
--- a/crypto/bn/bn_recp.c
+++ b/crypto/bn/bn_recp.c
@@ -32,9 +32,6 @@ BN_RECP_CTX *BN_RECP_CTX_new(void)
void BN_RECP_CTX_free(BN_RECP_CTX *recp)
{
- if (recp == NULL)
- return;
-
BN_free(&(recp->N));
BN_free(&(recp->Nr));
if (recp->flags & BN_FLG_MALLOCED)