aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2018-01-22 14:30:24 -0500
committerMatt Caswell <matt@openssl.org>2018-01-24 18:12:21 +0000
commita26dd465b21d8def440c16b6bd90227b03e12e02 (patch)
tree9a7c55d95c174ad1611013916801973ec861c2f1 /crypto/asn1
parent97ea1e7f42eea97b117af08b3c1d29f6443850ab (diff)
downloadopenssl-a26dd465b21d8def440c16b6bd90227b03e12e02.zip
openssl-a26dd465b21d8def440c16b6bd90227b03e12e02.tar.gz
openssl-a26dd465b21d8def440c16b6bd90227b03e12e02.tar.bz2
Fix error-path memory leak in asn_mime.c
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5142)
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/asn_mime.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c
index 936c8a5..2faff45 100644
--- a/crypto/asn1/asn_mime.c
+++ b/crypto/asn1/asn_mime.c
@@ -425,6 +425,7 @@ ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it)
|| hdr->value == NULL) {
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
ASN1err(ASN1_F_SMIME_READ_ASN1, ASN1_R_NO_SIG_CONTENT_TYPE);
+ sk_BIO_pop_free(parts, BIO_vfree);
return NULL;
}