Skip to content

Commit

Permalink
crypto/sm2/sm2_sign.c: Add BN_CTX_end
Browse files Browse the repository at this point in the history
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 #19266)
  • Loading branch information
JiangJias authored and t8m committed Jun 13, 2023
1 parent ec59752 commit 050dddb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/sm2/sm2_sign.c
Expand Up @@ -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;
Expand Down

0 comments on commit 050dddb

Please sign in to comment.