diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_exp.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 70a33f0d93..d9b6c737fc 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
@@ -134,7 +134,8 @@ int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) | |||
134 | rr = BN_CTX_get(ctx); | 134 | rr = BN_CTX_get(ctx); |
135 | else | 135 | else |
136 | rr = r; | 136 | rr = r; |
137 | if ((v = BN_CTX_get(ctx)) == NULL) goto err; | 137 | v = BN_CTX_get(ctx); |
138 | if (rr == NULL || v == NULL) goto err; | ||
138 | 139 | ||
139 | if (BN_copy(v,a) == NULL) goto err; | 140 | if (BN_copy(v,a) == NULL) goto err; |
140 | bits=BN_num_bits(p); | 141 | bits=BN_num_bits(p); |