summaryrefslogtreecommitdiffstats
path: root/crypto/sm2
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/sm2')
-rw-r--r--crypto/sm2/sm2_sign.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/sm2/sm2_sign.c b/crypto/sm2/sm2_sign.c
index 12ccd28bcf..e12eca12fb 100644
--- a/crypto/sm2/sm2_sign.c
+++ b/crypto/sm2/sm2_sign.c
@@ -279,9 +279,7 @@ int SM2_sign(int type, const unsigned char *dgst, int dgstlen,
*siglen = i2d_ECDSA_SIG(s, &sig);
- ECDSA_SIG_free(s);
-
- ret = 0;
+ ret = 1;
done:
ECDSA_SIG_free(s);