Free mDNS group entries in mdns_deinit()

This commit is contained in:
Julien BLACHE 2009-04-08 16:10:15 +02:00
parent b3b66449bc
commit 2e2dbc6964
1 changed files with 12 additions and 0 deletions

View File

@ -479,6 +479,7 @@ mdns_init(void)
void void
mdns_deinit(void) mdns_deinit(void)
{ {
struct mdns_group_entry *ge;
AvahiWatch *w; AvahiWatch *w;
AvahiTimeout *t; AvahiTimeout *t;
@ -488,6 +489,17 @@ mdns_deinit(void)
for (w = all_w; w; w = w->next) for (w = all_w; w; w = w->next)
event_del(&w->ev); 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) if (mdns_client != NULL)
avahi_client_free(mdns_client); avahi_client_free(mdns_client);
} }