diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_utl.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_utl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_utl.c b/src/lib/libcrypto/asn1/tasn_utl.c index e1051c2c3e..446a6f82bd 100644 --- a/src/lib/libcrypto/asn1/tasn_utl.c +++ b/src/lib/libcrypto/asn1/tasn_utl.c | |||
@@ -153,8 +153,7 @@ asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it) | |||
153 | 153 | ||
154 | enc = asn1_get_enc_ptr(pval, it); | 154 | enc = asn1_get_enc_ptr(pval, it); |
155 | if (enc) { | 155 | if (enc) { |
156 | if (enc->enc) | 156 | free(enc->enc); |
157 | free(enc->enc); | ||
158 | enc->enc = NULL; | 157 | enc->enc = NULL; |
159 | enc->len = 0; | 158 | enc->len = 0; |
160 | enc->modified = 1; | 159 | enc->modified = 1; |
@@ -171,8 +170,7 @@ asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, | |||
171 | if (!enc) | 170 | if (!enc) |
172 | return 1; | 171 | return 1; |
173 | 172 | ||
174 | if (enc->enc) | 173 | free(enc->enc); |
175 | free(enc->enc); | ||
176 | enc->enc = malloc(inlen); | 174 | enc->enc = malloc(inlen); |
177 | if (!enc->enc) | 175 | if (!enc->enc) |
178 | return 0; | 176 | return 0; |