]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: omninet: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Thu, 25 Oct 2012 08:29:06 +0000 (10:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:10:03 +0000 (10:10 -0700)
commit1968e8d84329760f4722c5c3951aec28b5ece59b
tree08a806e76110431e1b341693d28fa3ca4aae7c51
parent789a4bbd28e4e5128a66a6e35117ef9392fed867
USB: omninet: fix port-data memory leak

commit feffa7ca6008ab859dd7ab7448a5a899bf0aa98f upstream.

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/omninet.c