Skip to content

Commit

Permalink
cosmetic; mutex/cond destroys
Browse files Browse the repository at this point in the history
  • Loading branch information
ka9q committed Mar 16, 2024
1 parent 3a4234e commit c1d9d2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion avahi.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ static void *avahi_register(void *p){
// This will happen if avahi-daemon isn't running; sleep and retry indefinitely
fprintf(stderr,"Failed to create client: %s\n", avahi_strerror(error));
assert(userdata->simple_poll);
avahi_simple_poll_free(userdata->simple_poll); userdata->simple_poll = NULL;
avahi_simple_poll_free(userdata->simple_poll);
userdata->simple_poll = NULL;
sleep(5);
continue;
}
Expand Down Expand Up @@ -204,6 +205,8 @@ static void *avahi_register(void *p){
break;
}
// Get here only on early failure; give up completely
pthread_mutex_destroy(&userdata->avahi_mutex);
pthread_cond_destroy(&userdata->avahi_ready);
FREE(userdata->service_name);
FREE(userdata->service_type);
FREE(userdata->description);
Expand Down

0 comments on commit c1d9d2d

Please sign in to comment.