diff --git a/components/mdns/mdns.c b/components/mdns/mdns.c index 0faa0b509d..f63037fe9d 100644 --- a/components/mdns/mdns.c +++ b/components/mdns/mdns.c @@ -4170,7 +4170,7 @@ static mdns_search_once_t * _mdns_search_find_from(mdns_search_once_t * s, mdns_ continue; } if (s->type != MDNS_TYPE_PTR) { - if (!strcasecmp(name->host, s->instance)) { + if (s->instance && strcasecmp(name->host, s->instance) == 0) { return s; } s = s->next;