diff --git a/CHANGES b/CHANGES index 36064507e87f686e69d563a5aca3857eabd92d86..b2e31d6cf417e04fbc125a64bb8818e445c83202 100644 --- a/CHANGES +++ b/CHANGES @@ -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 ] + *) BIO_s_socket() had a broken should_retry() on Windoze. [Arne Ansper ] diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c index b4050506c3680823711030c1b22664907740b9df..ec143e873bbfa97626063fdfe8114d7a2b5b7b2f 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 c4a4ad5a605c81267b9c8560c2e651b181cd3efc..5f91239da55a055c75ec81a9cbf39888a31153c7 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); }