summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/ec/ec_key.c
diff options
context:
space:
mode:
authorShigeki Ohtsu <ohtsu@ohtsu.org>2016-09-22 20:53:25 +0900
committerShigeki Ohtsu <ohtsu@ohtsu.org>2016-09-22 23:05:52 +0900
commitd1039709a4dce1c841a8972988245a88f2266fe1 (patch)
treee057f824a5325759d64fda189cb54652039022ff /deps/openssl/openssl/crypto/ec/ec_key.c
parent91b40944a41f8ab1e499ed5bebeed520a215b9a5 (diff)
downloadandroid-node-v8-d1039709a4dce1c841a8972988245a88f2266fe1.tar.gz
android-node-v8-d1039709a4dce1c841a8972988245a88f2266fe1.tar.bz2
android-node-v8-d1039709a4dce1c841a8972988245a88f2266fe1.zip
deps: upgrade openssl sources to 1.0.2i
This replaces all sources of openssl-1.0.2i.tar.gz into deps/openssl/openssl PR-URL: https://github.com/nodejs/node/pull/8714 Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/openssl/openssl/crypto/ec/ec_key.c')
-rw-r--r--deps/openssl/openssl/crypto/ec/ec_key.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/deps/openssl/openssl/crypto/ec/ec_key.c b/deps/openssl/openssl/crypto/ec/ec_key.c
index bc94ab5661..456080ecfe 100644
--- a/deps/openssl/openssl/crypto/ec/ec_key.c
+++ b/deps/openssl/openssl/crypto/ec/ec_key.c
@@ -377,9 +377,9 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
return 0;
}
ctx = BN_CTX_new();
- if (!ctx)
- goto err;
-
+ if (ctx == NULL)
+ return 0;
+ BN_CTX_start(ctx);
point = EC_POINT_new(key->group);
if (!point)
@@ -432,10 +432,9 @@ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
ok = 1;
err:
- if (ctx)
- BN_CTX_free(ctx);
- if (point)
- EC_POINT_free(point);
+ BN_CTX_end(ctx);
+ BN_CTX_free(ctx);
+ EC_POINT_free(point);
return ok;
}