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);
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);
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);
return ret;
}
-void asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
+static void asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
{
/* If ADB or STACK just NULL the field */
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));
}