summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_utl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/tasn_utl.c')
-rw-r--r--crypto/asn1/tasn_utl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/asn1/tasn_utl.c b/crypto/asn1/tasn_utl.c
index 17318ea587..76e96051bf 100644
--- a/crypto/asn1/tasn_utl.c
+++ b/crypto/asn1/tasn_utl.c
@@ -154,8 +154,7 @@ void asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it)
ASN1_ENCODING *enc;
enc = asn1_get_enc_ptr(pval, it);
if (enc) {
- if (enc->enc)
- OPENSSL_free(enc->enc);
+ OPENSSL_free(enc->enc);
enc->enc = NULL;
enc->len = 0;
enc->modified = 1;
@@ -170,8 +169,7 @@ int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen,
if (!enc)
return 1;
- if (enc->enc)
- OPENSSL_free(enc->enc);
+ OPENSSL_free(enc->enc);
enc->enc = OPENSSL_malloc(inlen);
if (!enc->enc)
return 0;