]> git.baikalelectronics.ru Git - kernel.git/commit
USB: mct_u232: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Thu, 25 Oct 2012 08:29:13 +0000 (10:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Oct 2012 16:37:04 +0000 (09:37 -0700)
commit86ef3e597260fe3ece88a78320ffeb6468ded60c
tree4f0a989c4f77bc95b58566c10ad19d994a0036ec
parent2ad633ed59711dcdd6b6814490599f339a1c5c35
USB: mct_u232: fix port-data memory leak

Fix port-data memory leak by moving port data allocation and
deallocation to port_probe and port_remove.

Since commit c3e213df083439e (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.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

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