From e963f6fea1f4827b36b4f145e6463fa240c11bfa Mon Sep 17 00:00:00 2001 From: Gorachya Date: Tue, 23 Apr 2019 13:13:40 +0800 Subject: [PATCH] fixed --- crypto/sm9/sm9_sign.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/sm9/sm9_sign.c b/crypto/sm9/sm9_sign.c index a9466256..cd901ab1 100755 --- a/crypto/sm9/sm9_sign.c +++ b/crypto/sm9/sm9_sign.c @@ -198,6 +198,8 @@ end: BN_free(r); point_cleanup(&Ppubs); fp12_cleanup(w); + BN_CTX_end(bn_ctx); + BN_CTX_free(bn_ctx); return ret; } @@ -355,9 +357,7 @@ end: point_cleanup(&P); fp12_cleanup(w); fp12_cleanup(u); - if (bn_ctx) { - BN_CTX_end(bn_ctx); - } + BN_CTX_end(bn_ctx); BN_CTX_free(bn_ctx); return ret; }