From 1ed3bc248c5156be6bf85b550e948d4ece5091ac Mon Sep 17 00:00:00 2001 From: ZZMarquis Date: Fri, 28 Dec 2018 16:10:58 +0800 Subject: [PATCH] maybe memory leak maybe memory leak --- crypto/asn1/a_sign.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c index 200c1e6b..1a02e800 100644 --- a/crypto/asn1/a_sign.c +++ b/crypto/asn1/a_sign.c @@ -211,8 +211,9 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, #ifndef OPENSSL_NO_SM2 if (OBJ_obj2nid(algor1->algorithm) == NID_sm2sign_with_sm3) { if (!EVP_PKEY_CTX_set_ec_scheme(EVP_MD_CTX_pkey_ctx(ctx), NID_sm_scheme)) { + outl = 0; ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ERR_R_EC_LIB); - return 0; + goto err; } } #endif