Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avahi: try to fix crash when avahi client cannot be created, fixes #3041
  • Loading branch information
perexg committed Sep 4, 2015
1 parent af643fa commit 8aa67a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/avahi.c
Expand Up @@ -280,10 +280,12 @@ avahi_thread(void *aux)

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

while((avahi_do_restart == 0) &&
(avahi_simple_poll_iterate(avahi_asp, -1) == 0));
if (ac) {
while((avahi_do_restart == 0) &&
(avahi_simple_poll_iterate(avahi_asp, -1) == 0));

avahi_client_free(ac);
avahi_client_free(ac);
}

name = NULL;
free(name2);
Expand Down

0 comments on commit 8aa67a4

Please sign in to comment.