diff --git a/libguac/include/client.h b/libguac/include/client.h index 9ee187ef..899093ba 100644 --- a/libguac/include/client.h +++ b/libguac/include/client.h @@ -287,6 +287,9 @@ struct guac_client { * by the proxy, and any data allocated by the proxy client should be * freed. * + * Note that this handler will NOT be called if the client's + * guac_client_init() function fails. + * * Implement this handler if you store data inside the client. * * Example: diff --git a/libguac/src/client.c b/libguac/src/client.c index db53b224..22bb24c5 100644 --- a/libguac/src/client.c +++ b/libguac/src/client.c @@ -210,7 +210,7 @@ guac_client* guac_client_plugin_get_client(guac_client_plugin* plugin, client->__next_buffer_index = -1; if (plugin->init_handler(client, argc, argv) != 0) { - guac_client_free(client); + free(client); return NULL; }