summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_check.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2006-03-13 23:14:57 +0000
committerNils Larsch <nils@openssl.org>2006-03-13 23:14:57 +0000
commit47d556664695f6bbde0d0ab0c1261ed0070c81fd (patch)
treeef4e7c5c8e408fd774538a45826c340ee3b8480a /crypto/ec/ec_check.c
parent90bdfd97a68ed56d926a44b3d37f51b2450f5bb7 (diff)
fix error found by coverity: check if ctx is != NULL before calling BN_CTX_end()
Diffstat (limited to 'crypto/ec/ec_check.c')
-rw-r--r--crypto/ec/ec_check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ec/ec_check.c b/crypto/ec/ec_check.c
index f22c5641a8..0e316b4b3f 100644
--- a/crypto/ec/ec_check.c
+++ b/crypto/ec/ec_check.c
@@ -113,7 +113,8 @@ int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx)
ret = 1;
err:
- BN_CTX_end(ctx);
+ if (ctx != NULL)
+ BN_CTX_end(ctx);
if (new_ctx != NULL)
BN_CTX_free(new_ctx);
if (point)