Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avahi: fix memory leaks (missing avahi free calls)
  • Loading branch information
perexg committed Oct 2, 2014
1 parent 884ca54 commit e8607d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/avahi.c
Expand Up @@ -258,13 +258,18 @@ static void *
avahi_thread(void *aux)
{
const AvahiPoll *ap = avahi_simple_poll_get(avahi_asp);
AvahiClient *ac;

name = avahi_strdup("Tvheadend");

avahi_client_new(ap, AVAHI_CLIENT_NO_FAIL, client_callback, NULL, NULL);
ac = avahi_client_new(ap, AVAHI_CLIENT_NO_FAIL, client_callback, NULL, NULL);

while(avahi_simple_poll_iterate(avahi_asp, -1) == 0);

avahi_client_free(ac);
avahi_simple_poll_free((AvahiSimplePoll *)ap);
free(name);

return NULL;


Expand Down

0 comments on commit e8607d6

Please sign in to comment.