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-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=2d267382074937ce48c150799102276a8842068f;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 005fbf7..b13d132 100644 --- a/gost_ameth.c +++ b/gost_ameth.c @@ -757,8 +757,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)