--- libaitio/src/sock.c 2013/11/25 11:40:04 1.8 +++ libaitio/src/sock.c 2013/11/25 11:46:17 1.9 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: sock.c,v 1.8 2013/11/25 11:40:04 misho Exp $ +* $Id: sock.c,v 1.9 2013/11/25 11:46:17 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -59,7 +59,8 @@ io_closeClient(sched_task_t *task) schedCancelby(s->sock_root, taskMAX, CRITERIA_ARG, cli, NULL); - ioFreePTY(cli->cli_pty, cli->cli_name); + if (*cli->cli_name) + ioFreePTY(cli->cli_pty, cli->cli_name); if (s->sock_type == SOCK_STREAM) { shutdown(cli->cli_fd, SHUT_RDWR);