summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/tasn_new.c')
-rw-r--r--crypto/asn1/tasn_new.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c
index 7608b43b7f..63a4b38ee9 100644
--- a/crypto/asn1/tasn_new.c
+++ b/crypto/asn1/tasn_new.c
@@ -142,8 +142,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed)
return 1;
memerr2:
- if (!embed)
- ASN1_item_ex_free(pval, it);
+ asn1_item_embed_free(pval, it, embed);
memerr:
ASN1err(ASN1_F_ASN1_ITEM_EMBED_NEW, ERR_R_MALLOC_FAILURE);
#ifndef OPENSSL_NO_CRYPTO_MDEBUG
@@ -152,8 +151,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed)
return 0;
auxerr2:
- if (!embed)
- ASN1_item_ex_free(pval, it);
+ asn1_item_embed_free(pval, it, embed);
auxerr:
ASN1err(ASN1_F_ASN1_ITEM_EMBED_NEW, ASN1_R_AUX_ERROR);
#ifndef OPENSSL_NO_CRYPTO_MDEBUG