Do not call free handler for client if init does not complete.
This commit is contained in:
parent
61579bd9b7
commit
989f24be2b
@ -287,6 +287,9 @@ struct guac_client {
|
|||||||
* by the proxy, and any data allocated by the proxy client should be
|
* by the proxy, and any data allocated by the proxy client should be
|
||||||
* freed.
|
* 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.
|
* Implement this handler if you store data inside the client.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
|
@ -210,7 +210,7 @@ guac_client* guac_client_plugin_get_client(guac_client_plugin* plugin,
|
|||||||
client->__next_buffer_index = -1;
|
client->__next_buffer_index = -1;
|
||||||
|
|
||||||
if (plugin->init_handler(client, argc, argv) != 0) {
|
if (plugin->init_handler(client, argc, argv) != 0) {
|
||||||
guac_client_free(client);
|
free(client);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user