]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Partially fix #125 (Memory leak in pub_encode_gost_ec)
authorDmitry Belyavskiy <beldmit@gmail.com>
Fri, 22 Mar 2019 19:23:39 +0000 (22:23 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Fri, 22 Mar 2019 19:23:39 +0000 (22:23 +0300)
gost_ameth.c

index 6ae278655881c330797711047991da3d9d58dc7f..50d0804a4f3706311ed0309bb946e7282858c194 100644 (file)
@@ -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)