diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2016-09-22 13:05:59 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2016-09-22 13:05:59 +0000 |
commit | 2c14c598c3061ac2533f997352aa06a2266f44d9 (patch) | |
tree | 470894a14935f308eeac93c6cbf6cf25632e1cb1 /crypto/asn1/f_string.c | |
parent | 47b11f985b9e0ff561a67e19674de6fbcf79281d (diff) |
Notes
Diffstat (limited to 'crypto/asn1/f_string.c')
-rw-r--r-- | crypto/asn1/f_string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/f_string.c b/crypto/asn1/f_string.c index 6a6cf3471408b..0f7b9cfb119b5 100644 --- a/crypto/asn1/f_string.c +++ b/crypto/asn1/f_string.c @@ -166,8 +166,6 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_STRING, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -205,5 +203,7 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) err_sl: ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } |