From: Dan Carpenter Date: Tue, 24 Jul 2012 11:51:52 +0000 (+0100) Subject: tty: fix missing assignment X-Git-Tag: Ubuntu-5.13.0-19.19~23769^2~170 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4ac5d7050e4e4d63751e78fb152a274d05c08563;p=mirror_ubuntu-jammy-kernel.git 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 --- 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; }