Skip to content

Commit

Permalink
tty: fix missing assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 10, 2012
1 parent 6b9563a commit 4ac5d70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4ac5d70

Please sign in to comment.