--- libaitio/src/sock.c 2013/11/22 15:08:49 1.6.2.1 +++ libaitio/src/sock.c 2013/11/25 11:45:41 1.8.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: sock.c,v 1.6.2.1 2013/11/22 15:08:49 misho Exp $ +* $Id: sock.c,v 1.8.2.1 2013/11/25 11:45:41 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -58,6 +58,9 @@ io_closeClient(sched_task_t *task) pthread_mutex_unlock(&s->sock_mtx); schedCancelby(s->sock_root, taskMAX, CRITERIA_ARG, cli, NULL); + + if (*cli->cli_name) + ioFreePTY(cli->cli_pty, cli->cli_name); if (s->sock_type == SOCK_STREAM) { shutdown(cli->cli_fd, SHUT_RDWR);