Ensure the mime_hdr_free function can handle NULLs
Sometimes it is called with a NULL pointer Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
2b201c5c9d
commit
030648cea9
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue