Currently we deallocate the buffer tree node of the client
task in case the connect fails and in audiod.c's close_stat_pipe()
but miss to free it for para_client in case of a regular connection
shutdown.
Fix this memory leak by freeing the buffer tree node in
client_close().
{
if (!stat_task->ct)
return;
- btr_free_node(stat_task->ct->btrn);
client_close(stat_task->ct);
stat_task->ct = NULL;
clear_and_dump_items();
free(ct->user);
free(ct->config_file);
free(ct->key_file);
+ btr_free_node(ct->btrn);
client_cmdline_parser_free(&ct->conf);
free(ct);
}
if (ret < 0) {
PARA_ERROR_LOG("%s\n", para_strerror(-ret));
btr_remove_node(ct->btrn);
- btr_free_node(ct->btrn);
client_close(ct);
*ct_ptr = NULL;
}