summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorben <ben>1999-01-04 21:39:33 +0000
committerben <ben>1999-01-04 21:39:33 +0000
commit3a64778d581ab8f6982a023c77ac910a08b7900d (patch)
tree0ec9f2bf46404d54d00f9d70d27a8582eedb668e /crypto
parentf58f7546c86e0589a6aad110b14afa51afb53389 (diff)
downloadopenssl-3a64778d581ab8f6982a023c77ac910a08b7900d.tar.gz
Only free if it ain't NULL.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/rsa/rsa_eay.c3
-rw-r--r--crypto/rsa/rsa_enc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c
index b4050506c..ec143e873 100644
--- a/crypto/rsa/rsa_eay.c
+++ b/crypto/rsa/rsa_eay.c
@@ -474,7 +474,8 @@ RSA *rsa;
err:
BN_clear_free(&m1);
BN_clear_free(&r1);
- BN_CTX_free(ctx);
+ if(ctx)
+ BN_CTX_free(ctx);
return(ret);
}
diff --git a/crypto/rsa/rsa_enc.c b/crypto/rsa/rsa_enc.c
index c4a4ad5a6..5f91239da 100644
--- a/crypto/rsa/rsa_enc.c
+++ b/crypto/rsa/rsa_enc.c
@@ -531,7 +531,8 @@ RSA *rsa;
err:
if (m1 != NULL) BN_free(m1);
if (r1 != NULL) BN_free(r1);
- BN_CTX_free(ctx);
+ if(ctx != NULL)
+ BN_CTX_free(ctx);
return(ret);
}