htsmsg_field_find - protect for NULL arguments
This commit is contained in:
parent
80ce9ae84e
commit
b1bdbf4644
1 changed files with 2 additions and 0 deletions
|
@ -111,6 +111,8 @@ htsmsg_field_find(htsmsg_t *msg, const char *name)
|
|||
{
|
||||
htsmsg_field_t *f;
|
||||
|
||||
if (msg == NULL || name == NULL)
|
||||
return NULL;
|
||||
TAILQ_FOREACH(f, &msg->hm_fields, hmf_link) {
|
||||
if(f->hmf_name != NULL && !strcmp(f->hmf_name, name))
|
||||
return f;
|
||||
|
|
Loading…
Add table
Reference in a new issue