From 4ac5d7050e4e4d63751e78fb152a274d05c08563 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 24 Jul 2012 12:51:52 +0100 Subject: [PATCH] tty: fix missing assignment We're trying to save the termios state and we need to allocate a buffer to do it. Smatch complains that the buffer is leaked at the end of the function. Signed-off-by: Dan Carpenter Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/tty/tty_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index c6f4d711771b..608749978df4 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1450,6 +1450,7 @@ void tty_free_termios(struct tty_struct *tty) pr_warn("tty: no memory to save termios state.\n"); return; } + tty->driver->termios[idx] = tp; } *tp = tty->termios; }