From 4512a7ce9ed60abf016f7e019043adaeb106b08e Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Fri, 16 Jul 2010 18:36:16 +0200 Subject: [PATCH] Do not add service browser to the list if browser creation fails --- src/mdns_avahi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mdns_avahi.c b/src/mdns_avahi.c index cd002d32..238fb577 100644 --- a/src/mdns_avahi.c +++ b/src/mdns_avahi.c @@ -800,6 +800,11 @@ mdns_browse(char *type, mdns_browse_cb cb) { DPRINTF(E_LOG, L_MDNS, "Failed to create service browser: %s\n", avahi_strerror(avahi_client_errno(mdns_client))); + + browser_list = mb->next; + free(mb->type); + free(mb); + return -1; }