diff options
author | Nils Larsch <nils@openssl.org> | 2006-03-13 23:14:57 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2006-03-13 23:14:57 +0000 |
commit | 47d556664695f6bbde0d0ab0c1261ed0070c81fd (patch) | |
tree | ef4e7c5c8e408fd774538a45826c340ee3b8480a /crypto/ec/ec2_smpl.c | |
parent | 90bdfd97a68ed56d926a44b3d37f51b2450f5bb7 (diff) |
fix error found by coverity: check if ctx is != NULL before calling BN_CTX_end()
Diffstat (limited to 'crypto/ec/ec2_smpl.c')
-rw-r--r-- | crypto/ec/ec2_smpl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ec/ec2_smpl.c b/crypto/ec/ec2_smpl.c index a2eb64859f..527e6d8147 100644 --- a/crypto/ec/ec2_smpl.c +++ b/crypto/ec/ec2_smpl.c @@ -281,7 +281,8 @@ int ec_GF2m_simple_group_check_discriminant(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); return ret; |