mdns_init: avoid null reference access

- when avahi client creation fails with mdns_client=null, use avahi_strerror(error) instead of MDNSERR
  to avoid access to mdns_client->error.
This commit is contained in:
hgy59 2022-05-22 20:56:49 +02:00
parent 3c48a07acb
commit 30f33b1b1d
1 changed files with 1 additions and 1 deletions

View File

@ -1044,7 +1044,7 @@ mdns_init(void)
client_callback, NULL, &error);
if (!mdns_client)
{
DPRINTF(E_WARN, L_MDNS, "mdns_init: Could not create Avahi client: %s\n", MDNSERR);
DPRINTF(E_WARN, L_MDNS, "mdns_init: Could not create Avahi client: %s\n", avahi_strerror(error));
return -1;
}