|Subject:||Re: [fluid-dev] Small memory leak in tcp shell server.|
|Date:||Wed, 11 Oct 2017 10:56:38 +0200|
There is a small memory leak in tcp command shell server in v 1.1.6 and may be still present in v1.1.7 ?.
The memory leak is a lack of deletion of the command handler (fluid_cmd_handler_t).
The command handler is created at client connection time, just before client creation task (in fluid_cmd.c-fluid_server_
connection(fluid_server_t* server, fluid_socket_t client_socket, char* addr)
handler = server->newclient(server->
However, this command handler seems never deleted (delete_fluid_cmd_handler()) (imho).
In this case this handler should be deleted on the following events:
- (1) When the remote client quit, or when the server force client closing (i.e at client task destruction time).
- (2) On error when calling 'client creation task' function.
So, the fusing fix could be to call delete_fluid_cmd_handler() only one time (i.e when the client task is deleted) ((in fluid_cmd.c-delete_fluid_
This is a fresh proposition and haven't not yet tested.
fluid-dev mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|