diff --git a/crypto/gmapi/gmapi_skf_ec.c b/crypto/gmapi/gmapi_skf_ec.c index 44c3d256..d54f243d 100644 --- a/crypto/gmapi/gmapi_skf_ec.c +++ b/crypto/gmapi/gmapi_skf_ec.c @@ -620,10 +620,7 @@ int i2d_ECCCIPHERBLOB(ECCCIPHERBLOB *a, unsigned char **pp) return 0; } - if ((ret = i2d_SM2CiphertextValue(cv, pp)) <= 0) { - return 0; - } - + ret = i2d_SM2CiphertextValue(cv, pp)); SM2CiphertextValue_free(cv); return ret; }