summaryrefslogtreecommitdiffstats
path: root/crypto/sm2
diff options
context:
space:
mode:
authorJiasheng Jiang <jiasheng@iscas.ac.cn>2022-09-23 10:35:39 +0800
committerTomas Mraz <tomas@openssl.org>2023-06-13 13:37:33 +0200
commit050dddb06162a8016c004317273f8f01b72ac20a (patch)
treebfc92228859af72cc0186ecb36f5de01ab0aef31 /crypto/sm2
parentec59752835f616860cd9451d6cfcea16bfc3ad05 (diff)
crypto/sm2/sm2_sign.c: Add BN_CTX_end
To match the BN_CTX_start, it should be better to add BN_CTX_end in the end of the function. Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19266)
Diffstat (limited to 'crypto/sm2')
-rw-r--r--crypto/sm2/sm2_sign.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/sm2/sm2_sign.c b/crypto/sm2/sm2_sign.c
index 67c61b1dcd..67d020ffaa 100644
--- a/crypto/sm2/sm2_sign.c
+++ b/crypto/sm2/sm2_sign.c
@@ -390,6 +390,7 @@ static int sm2_sig_verify(const EC_KEY *key, const ECDSA_SIG *sig,
ret = 1;
done:
+ BN_CTX_end(ctx);
EC_POINT_free(pt);
BN_CTX_free(ctx);
return ret;