From eeb821f707246ed9b909e4638c110fb60ec7e485 Mon Sep 17 00:00:00 2001 From: Nils Larsch Date: Tue, 14 Mar 2006 22:48:41 +0000 Subject: [PATCH] fix error found by coverity: check if ctx is != NULL before calling BN_CTX_end() --- crypto/ec/ec_mult.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.25.1