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
|
||||
* 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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user