From 2d267382074937ce48c150799102276a8842068f Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Fri, 22 Mar 2019 22:23:39 +0300 Subject: [PATCH] Partially fix #125 (Memory leak in pub_encode_gost_ec) --- gost_ameth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5