Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
4ac5d705 6b9563a7

+1
+1
drivers/tty/tty_io.c
··· 1450 1450 pr_warn("tty: no memory to save termios state.\n"); 1451 1451 return; 1452 1452 } 1453 + tty->driver->termios[idx] = tp; 1453 1454 } 1454 1455 *tp = tty->termios; 1455 1456 }