projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[SM2_sign] fix double free and return value
[openssl.git]
/
crypto
/
sm2
/
sm2_sign.c
diff --git
a/crypto/sm2/sm2_sign.c
b/crypto/sm2/sm2_sign.c
index 12ccd28bcfa7ea72d4a1e0aa0cb80ff7630d0321..e12eca12fb432944540b80297c5569e910e18917 100644
(file)
--- 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);