diff -urN linux-2.6.9-bk/drivers/char/tty_io.c linux/drivers/char/tty_io.c --- linux-2.6.9-bk/drivers/char/tty_io.c 2004-10-22 09:53:21.373263820 -0400 +++ linux/drivers/char/tty_io.c 2004-10-22 10:36:10.753679871 -0400 @@ -168,8 +168,7 @@ static inline void free_tty_struct(struct tty_struct *tty) { - if (tty->write_buf) - kfree(tty->write_buf); + kfree(tty->write_buf); kfree(tty); } @@ -1060,6 +1059,7 @@ up(&tty->atomic_write); return -ENOMEM; } + kfree(tty->write_buf); tty->write_cnt = chunk; tty->write_buf = buf; }