From: Dmitry Belyavskiy Date: Fri, 22 Mar 2019 19:23:39 +0000 (+0300) Subject: Partially fix #125 (Memory leak in pub_encode_gost_ec) X-Git-Tag: v3.0.0~298 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=0aac5d6ccbd0fa472c1277cb5ae6125066546806;p=openssl-gost%2Fengine.git Partially fix #125 (Memory leak in pub_encode_gost_ec) --- diff --git a/gost_ameth.c b/gost_ameth.c index 6ae2786..50d0804 100644 --- a/gost_ameth.c +++ b/gost_ameth.c @@ -773,8 +773,8 @@ static int pub_encode_gost_ec(X509_PUBKEY *pub, const EVP_PKEY *pk) } ret = i2d_ASN1_OCTET_STRING(octet, &buf); - ASN1_BIT_STRING_free(octet); err: + ASN1_BIT_STRING_free(octet); if (X) BN_free(X); if (Y)