diff options
author | Steven Valdez <svaldez@google.com> | 2016-03-01 13:20:43 -0500 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-05-11 18:48:48 +0100 |
commit | 2ab851b779a77d119e1677b2495b368a46d83eef (patch) | |
tree | ba5eb7a56c12e1e726c7f1ef7fbb8b1ddbb4c071 /crypto/ec/ec_key.c | |
parent | 5a22cf96a0a1c34968c0664f99b7ebb7ccf6ed75 (diff) | |
download | openssl-new-2ab851b779a77d119e1677b2495b368a46d83eef.tar.gz |
Adding missing BN_CTX_(start/end) in crypto/ec/ec_key.c
RT#4363
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/ec/ec_key.c')
-rw-r--r-- | crypto/ec/ec_key.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index 31ed8a58a8..14909b085c 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -399,8 +399,9 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, } ctx = BN_CTX_new(); if (ctx == NULL) - goto err; + return 0; + BN_CTX_start(ctx); point = EC_POINT_new(key->group); if (point == NULL) @@ -455,6 +456,7 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, ok = 1; err: + BN_CTX_end(ctx); BN_CTX_free(ctx); EC_POINT_free(point); return ok; |