diff options
Diffstat (limited to 'lib/libcrypto/asn1/tasn_utl.c')
-rw-r--r-- | lib/libcrypto/asn1/tasn_utl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libcrypto/asn1/tasn_utl.c b/lib/libcrypto/asn1/tasn_utl.c index e1051c2c3e5..446a6f82bd2 100644 --- a/lib/libcrypto/asn1/tasn_utl.c +++ b/lib/libcrypto/asn1/tasn_utl.c @@ -153,8 +153,7 @@ asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it) enc = asn1_get_enc_ptr(pval, it); if (enc) { - if (enc->enc) - free(enc->enc); + free(enc->enc); enc->enc = NULL; enc->len = 0; enc->modified = 1; @@ -171,8 +170,7 @@ asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, if (!enc) return 1; - if (enc->enc) - free(enc->enc); + free(enc->enc); enc->enc = malloc(inlen); if (!enc->enc) return 0; |