From 050dddb06162a8016c004317273f8f01b72ac20a Mon Sep 17 00:00:00 2001 From: Jiasheng Jiang Date: Fri, 23 Sep 2022 10:35:39 +0800 Subject: [PATCH] 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 Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19266) --- crypto/sm2/sm2_sign.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/sm2/sm2_sign.c b/crypto/sm2/sm2_sign.c index 67c61b1dcdc..67d020ffaac 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; -- 2.47.2