projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix error found by coverity: check if ctx is != NULL before calling BN_CTX_end()
[oweals/openssl.git]
/
crypto
/
ec
/
ec2_smpl.c
diff --git
a/crypto/ec/ec2_smpl.c
b/crypto/ec/ec2_smpl.c
index a9f7c9d378060d195e33127afd257d2ff3c44132..5cd1eac41fc33bb1bf435f4fc6d606870b0c8f85 100644
(file)
--- 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:
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;
if (new_ctx != NULL)
BN_CTX_free(new_ctx);
return ret;