--- libaitio/src/pty.c 2013/05/30 09:10:13 1.5 +++ libaitio/src/pty.c 2013/11/25 11:40:04 1.6 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: pty.c,v 1.5 2013/05/30 09:10:13 misho Exp $ +* $Id: pty.c,v 1.6 2013/11/25 11:40:04 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -92,7 +92,7 @@ ioFreePTY(int ptyfd, const char *ttyname) if (ptyfd != -1) close(ptyfd); - if (ttyname) { + if (*ttyname) { chown(ttyname, (uid_t) 0, (gid_t) 0); chmod(ttyname, (mode_t) 0666); }