diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2016-01-10 14:42:10 -0500 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-01-11 02:41:16 +0000 |
commit | c2e27310c790c0dd2f87dd420e65e0cca522ddb2 (patch) | |
tree | bda08e77fcbd3f993498ef5a4c7d9b551b0b47ed /crypto/asn1/tasn_new.c | |
parent | 3af45d9978c0bf6ce333e9666f41a03d41822d0c (diff) |
Enable/disable crypto-mdebug just like other features
Also always abort() on leak failure.
Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/asn1/tasn_new.c')
-rw-r--r-- | crypto/asn1/tasn_new.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index 9362ca2662..125b26fd7f 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c @@ -102,7 +102,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) else asn1_cb = 0; -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_push(it->sname ? it->sname : "asn1_item_embed_new"); #endif @@ -135,7 +135,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) if (!i) goto auxerr; if (i == 2) { -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_pop(); #endif return 1; @@ -160,7 +160,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) if (!i) goto auxerr; if (i == 2) { -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_pop(); #endif return 1; @@ -184,14 +184,14 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) goto auxerr; break; } -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_pop(); #endif return 1; memerr: ASN1err(ASN1_F_ASN1_ITEM_EMBED_NEW, ERR_R_MALLOC_FAILURE); -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_pop(); #endif return 0; @@ -199,7 +199,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) auxerr: ASN1err(ASN1_F_ASN1_ITEM_EMBED_NEW, ASN1_R_AUX_ERROR); ASN1_item_ex_free(pval, it); -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_pop(); #endif return 0; @@ -259,7 +259,7 @@ static int asn1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) *pval = NULL; return 1; } -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_push(tt->field_name ? tt->field_name : "asn1_template_new"); #endif @@ -279,7 +279,7 @@ static int asn1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) /* Otherwise pass it back to the item routine */ ret = asn1_item_embed_new(pval, it, embed); done: -#ifdef CRYPTO_MDEBUG +#ifndef OPENSSL_NO_CRYPTO_MDEBUG OPENSSL_mem_debug_pop(); #endif return ret; |