$OpenBSD$
--- unix/tclUnixChan.c.orig	2004-01-01 08:37:57.000000000 -0800
+++ unix/tclUnixChan.c	2004-01-01 08:42:20.000000000 -0800
@@ -969,9 +969,11 @@ TtySetOptionProc(instanceData, interp, o
 		    "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, o
 			"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, o
 		}
 #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, o
 		}
 #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, o
 		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, o
 			    "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;
     }
 
