Fix leak
authorDr. Stephen Henson <steve@openssl.org>
Thu, 31 Aug 2006 20:10:37 +0000 (20:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 31 Aug 2006 20:10:37 +0000 (20:10 +0000)
crypto/asn1/tasn_dec.c

index 0eefcfb..fe1bfd0 100644 (file)
@@ -878,7 +878,10 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval,
                 * for UNIVERSAL class and ignore the tag.
                 */
                if (!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL))
+                       {
+                       free_cont = 1;
                        goto err;
+                       }
                len = buf.length;
                /* Append a final null to string */
                if (!BUF_MEM_grow_clean(&buf, len + 1))