diff --git a/src/mdns_avahi.c b/src/mdns_avahi.c index 8482dd88..e6121f4f 100644 --- a/src/mdns_avahi.c +++ b/src/mdns_avahi.c @@ -479,6 +479,7 @@ mdns_init(void) void mdns_deinit(void) { + struct mdns_group_entry *ge; AvahiWatch *w; AvahiTimeout *t; @@ -488,6 +489,17 @@ mdns_deinit(void) for (w = all_w; w; w = w->next) event_del(&w->ev); + for (ge = group_entries; ge; ge = ge->next) + { + group_entries = ge->next; + + free(ge->name); + free(ge->type); + avahi_string_list_free(ge->txt); + + free(ge); + } + if (mdns_client != NULL) avahi_client_free(mdns_client); }