Do not add service browser to the list if browser creation fails

This commit is contained in:
Julien BLACHE 2010-07-16 18:36:16 +02:00
parent 4544dc152b
commit 4512a7ce9e

View File

@ -800,6 +800,11 @@ mdns_browse(char *type, mdns_browse_cb cb)
{ {
DPRINTF(E_LOG, L_MDNS, "Failed to create service browser: %s\n", DPRINTF(E_LOG, L_MDNS, "Failed to create service browser: %s\n",
avahi_strerror(avahi_client_errno(mdns_client))); avahi_strerror(avahi_client_errno(mdns_client)));
browser_list = mb->next;
free(mb->type);
free(mb);
return -1; return -1;
} }