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>
This commit is contained in:
parent
232127d245
commit
34749f47da
@ -415,13 +415,6 @@ BN_BLINDING *rsa_setup_blinding(RSA *rsa, BN_CTX *in_ctx) {
|
||||
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 @@ BN_BLINDING *rsa_setup_blinding(RSA *rsa, BN_CTX *in_ctx) {
|
||||
}
|
||||
|
||||
err:
|
||||
BN_CTX_end(ctx);
|
||||
if (in_ctx == NULL) {
|
||||
BN_CTX_free(ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user