[fix] free the right memory when avahi service disapeares, close #25

This commit is contained in:
Julian Sparber
2017-12-29 21:42:31 +01:00
parent 0312fdad4d
commit 523c55d539
2 changed files with 3 additions and 3 deletions

View File

@@ -156,7 +156,7 @@ client_callback (AvahiClient *c,
fprintf(stderr,
"Server connection failure: %s\n",
avahi_strerror(avahi_client_errno(c)));
teleport_browser_avahi_shutdown();
avahi_client_free(client);
}
}

View File

@@ -174,8 +174,8 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN
case AVAHI_CLIENT_FAILURE:
fprintf(stderr, "Client failure: %s\n", avahi_strerror(avahi_client_errno(c)));
//avahi_simple_poll_quit(simple_poll);
teleport_publish_shutdown();
avahi_client_free(client);
avahi_free(name);
break;