]> bbs.cooldavid.org Git - net-next-2.6.git/commit
tty: USB: serial/mct_u232, fix tty refcnt
authorJiri Slaby <jirislaby@gmail.com>
Sun, 6 Sep 2009 21:10:10 +0000 (23:10 +0200)
committerLive-CD User <linux@linux.site>
Sat, 19 Sep 2009 20:13:37 +0000 (13:13 -0700)
commit054f2346cb0e524cbb678759bfedabfdba4d0100
treef27ff34eb965df9437b56614689578ce5d3dffd4
parent7e63d0c453aa3fae714bc679f6768203b5dc9c32
tty: USB: serial/mct_u232, fix tty refcnt

Stanse found a tty refcnt leak in read_int_callback. In fact
it's handled wrong altogether. tty_port_tty_get can return NULL
and it's not checked in that manner.

Fix that by checking the tty_port_tty_get retval and put tty kref
properly.

http://stanse.fi.muni.cz/

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/mct_u232.c