Preliminary streaming ASN1 encode support.
[openssl.git] / crypto / asn1 / tasn_fre.c
index 75a4a6f63488cebe0bc76ca3dcdb790508c0ee67..910f9b4f262f88554bd13187731aa9583b6f425d 100644 (file)
@@ -130,6 +130,7 @@ static void asn1_item_combine_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int c
                if(ef && ef->asn1_ex_free) ef->asn1_ex_free(pval, it);
                break;
 
+               case ASN1_ITYPE_NDEF_SEQUENCE:
                case ASN1_ITYPE_SEQUENCE:
                if(asn1_do_lock(pval, -1, it) > 0) return;
                if(asn1_cb) {
@@ -167,11 +168,12 @@ void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
                for(i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
                        ASN1_VALUE *vtmp;
                        vtmp = sk_ASN1_VALUE_value(sk, i);
-                       asn1_item_combine_free(&vtmp, tt->item, 0);
+                       asn1_item_combine_free(&vtmp, ASN1_ITEM_ptr(tt->item), 0);
                }
                sk_ASN1_VALUE_free(sk);
                *pval = NULL;
-       } else asn1_item_combine_free(pval, tt->item, tt->flags & ASN1_TFLG_COMBINE);
+       } else asn1_item_combine_free(pval, ASN1_ITEM_ptr(tt->item),
+                                               tt->flags & ASN1_TFLG_COMBINE);
 }
 
 void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it)