summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-08-22 22:27:27 +0100
committerMatt Caswell <matt@openssl.org>2016-08-23 00:19:15 +0100
commit030648cea98faeba94a510ecc6e3d283040eec5c (patch)
treed3e3ac29556031ebe142fec7e695e85895a83802 /crypto
parent2b201c5c9dc2e2fd6afb94bf9b70a1d6482ba7d2 (diff)
Ensure the mime_hdr_free function can handle NULLs
Sometimes it is called with a NULL pointer Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/asn_mime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c
index a4527a160a..d7ec801b1e 100644
--- a/crypto/asn1/asn_mime.c
+++ b/crypto/asn1/asn_mime.c
@@ -918,6 +918,8 @@ static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, const char *name)
static void mime_hdr_free(MIME_HEADER *hdr)
{
+ if (hdr == NULL)
+ return;
OPENSSL_free(hdr->name);
OPENSSL_free(hdr->value);
if (hdr->params)