tty: save newly allocated buffer in tty_free_termios()
Subsystems (2)
PATCH 1/1 tty: save newly allocated buffer in tty_free_termios()
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 <[email protected]>
drivers/tty/tty_io.c +1 -0
@@ -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; }
Quoted 5 lines · On Fri, 20 Jul 2012 16:32:45 +0300 Dan Carpenter <[email protected]>…
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 <[email protected]>
Acked-by Alan Cox <[email protected]>
(introduced in the recent patches so no need to go back into stable or anywhere like that)