make update
[openssl.git] / crypto / asn1 / tasn_new.c
index 798f9bfd5e38ff3e8b467ea9b9cc750d434ab6af..e93db4f0c1490d8846966ae91beb189960661e58 100644 (file)
@@ -138,7 +138,12 @@ static int asn1_item_ex_combine_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int
                if(asn1_cb) {
                        i = asn1_cb(ASN1_OP_NEW_PRE, pval, it);
                        if(!i) goto auxerr;
-                       if(i==2) return 1;
+                       if(i==2) {
+#ifdef CRYPTO_MDEBUG
+                               if(it->sname) CRYPTO_pop_info();
+#endif
+                               return 1;
+                       }
                }
                if(!combine) {
                        *pval = OPENSSL_malloc(it->size);
@@ -234,7 +239,7 @@ static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it)
 
 int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
 {
-       const ASN1_ITEM *it = tt->item;
+       const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item);
        int ret;
        if(tt->flags & ASN1_TFLG_OPTIONAL) {
                asn1_template_clear(pval, tt);
@@ -277,7 +282,7 @@ void asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
        if(tt->flags & (ASN1_TFLG_ADB_MASK|ASN1_TFLG_SK_MASK)) 
                *pval = NULL;
        else
-               asn1_item_clear(pval, tt->item);
+               asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item));
 }