summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixChan.c')
-rw-r--r--unix/tclUnixChan.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 794e8dd..b7f0339 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixChan.c,v 1.42.2.2 2004/02/25 14:54:52 dkf Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.42.2.3 2004/05/04 03:50:59 andreas_kupries Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -969,9 +969,11 @@ TtySetOptionProc(instanceData, interp, optionName, value)
"bad value for -xchar: should be a list of two elements",
(char *) NULL);
}
+ ckfree((char *) argv);
return TCL_ERROR;
}
SETIOSTATE(fsPtr->fd, &iostate);
+ ckfree((char *) argv);
return TCL_OK;
}
@@ -1004,12 +1006,14 @@ TtySetOptionProc(instanceData, interp, optionName, value)
"bad value for -ttycontrol: should be a list of",
"signal,value pairs", (char *) NULL);
}
+ ckfree((char *) argv);
return TCL_ERROR;
}
GETCONTROL(fsPtr->fd, &control);
while (argc > 1) {
if (Tcl_GetBoolean(interp, argv[1], &flag) == TCL_ERROR) {
+ ckfree((char *) argv);
return TCL_ERROR;
}
if (strncasecmp(argv[0], "DTR", strlen(argv[0])) == 0) {
@@ -1021,6 +1025,7 @@ TtySetOptionProc(instanceData, interp, optionName, value)
}
#else /* !TIOCM_DTR */
UNSUPPORTED_OPTION("-ttycontrol DTR");
+ ckfree((char *) argv);
return TCL_ERROR;
#endif /* TIOCM_DTR */
} else if (strncasecmp(argv[0], "RTS", strlen(argv[0])) == 0) {
@@ -1032,6 +1037,7 @@ TtySetOptionProc(instanceData, interp, optionName, value)
}
#else /* !TIOCM_RTS*/
UNSUPPORTED_OPTION("-ttycontrol RTS");
+ ckfree((char *) argv);
return TCL_ERROR;
#endif /* TIOCM_RTS*/
} else if (strncasecmp(argv[0], "BREAK", strlen(argv[0])) == 0) {
@@ -1039,6 +1045,7 @@ TtySetOptionProc(instanceData, interp, optionName, value)
SETBREAK(fsPtr->fd, flag);
#else /* !SETBREAK */
UNSUPPORTED_OPTION("-ttycontrol BREAK");
+ ckfree((char *) argv);
return TCL_ERROR;
#endif /* SETBREAK */
} else {
@@ -1047,12 +1054,14 @@ TtySetOptionProc(instanceData, interp, optionName, value)
"bad signal for -ttycontrol: must be ",
"DTR, RTS or BREAK", (char *) NULL);
}
+ ckfree((char *) argv);
return TCL_ERROR;
}
argc -= 2, argv += 2;
} /* while (argc > 1) */
SETCONTROL(fsPtr->fd, &control);
+ ckfree((char *) argv);
return TCL_OK;
}