mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-16 09:08:04 -04:00
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:
parent
3c48a07acb
commit
30f33b1b1d
@ -1044,7 +1044,7 @@ mdns_init(void)
|
|||||||
client_callback, NULL, &error);
|
client_callback, NULL, &error);
|
||||||
if (!mdns_client)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user