Remove unnecessary assignment of |e| in |rsa_setup_blinding|. After its initial assignment, |e| is immediately reassigned another value and so the initial assignment from |BN_CTX_get| is useless. If that were not the case, then the |BN_free(e)| at the end of the function would be very bad. Change-Id: Id63a172073501c8ac157db9188a22f55ee36b205 Reviewed-on: https://boringssl-review.googlesource.com/6951 Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/crypto/rsa/blinding.c b/crypto/rsa/blinding.c index d21633f..5addddc 100644 --- a/crypto/rsa/blinding.c +++ b/crypto/rsa/blinding.c
@@ -415,13 +415,6 @@ ctx = in_ctx; } - BN_CTX_start(ctx); - e = BN_CTX_get(ctx); - if (e == NULL) { - OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE); - goto err; - } - if (rsa->e == NULL) { e = rsa_get_public_exp(rsa->d, rsa->p, rsa->q, ctx); if (e == NULL) { @@ -450,7 +443,6 @@ } err: - BN_CTX_end(ctx); if (in_ctx == NULL) { BN_CTX_free(ctx); }