diff options
author | Nils Larsch <nils@openssl.org> | 2006-03-14 22:48:41 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2006-03-14 22:48:41 +0000 |
commit | eeb821f707246ed9b909e4638c110fb60ec7e485 (patch) | |
tree | e4d2f6053ce3b4ff345df46a5c0f8645a49b7fba /crypto/ec/ec_mult.c | |
parent | 47d556664695f6bbde0d0ab0c1261ed0070c81fd (diff) |
fix error found by coverity: check if ctx is != NULL before calling BN_CTX_end()
Diffstat (limited to 'crypto/ec/ec_mult.c')
-rw-r--r-- | crypto/ec/ec_mult.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index 7320e31c5c..a045139a00 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -879,7 +879,8 @@ int ec_wNAF_precompute_mult(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 (pre_comp) |