]> git.baikalelectronics.ru Git - kernel.git/commit
TTY: isicom, fix tty buffers memory leak
authorJiri Slaby <jslaby@suse.cz>
Thu, 15 Nov 2012 08:49:55 +0000 (09:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Nov 2012 01:20:58 +0000 (17:20 -0800)
commit4ad0d0ef982d086a237a8bc6de9bf760a6cb631b
tree0d1a37909ac7157b8f38eb94d9a285224dcc383a
parent7c7b4add2c6f55109644a0592ce73003d151d3f2
TTY: isicom, fix tty buffers memory leak

After commit "TTY: move tty buffers to tty_port", the tty buffers are
not freed in some drivers. This is because tty_port_destructor is not
called whenever a tty_port is freed. This was an assumption I counted
with but was unfortunately untrue. So fix the drivers to fulfil this
assumption.

This one is special as we need more work to be done. Previously,
the tty_port was initialized at module load time, but to be able to
destroy the port and init it again, we now do the initialization in
probe and destroy in remove. I.e. at more appropriate places for that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/isicom.c