diff options
author | Ben Laurie <ben@openssl.org> | 1999-01-04 21:39:34 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-01-04 21:39:34 +0000 |
commit | 4a18cddd168bec6a4e22ecf733149efa4d85b3a5 (patch) | |
tree | d45133ff4d69406d27df1d3dedea524b76293785 | |
parent | bb65e20b1cc12f928a2e22765a00d938d1a12ced (diff) | |
download | openssl-4a18cddd168bec6a4e22ecf733149efa4d85b3a5.tar.gz |
Only free if it ain't NULL.
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | crypto/rsa/rsa_eay.c | 3 | ||||
-rw-r--r-- | crypto/rsa/rsa_enc.c | 3 |
3 files changed, 7 insertions, 2 deletions
@@ -5,6 +5,9 @@ Changes between 0.9.1c and 0.9.2 + *) rsa_eay.c would attempt to free a NULL context. + [Arne Ansper <arne@ats.cyber.ee>] + *) BIO_s_socket() had a broken should_retry() on Windoze. [Arne Ansper <arne@ats.cyber.ee>] diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c index b4050506c3..ec143e873b 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 c4a4ad5a60..5f91239da5 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); } |