]> git.baikalelectronics.ru Git - kernel.git/commit
USB: cp210x: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Mon, 15 Oct 2012 13:47:20 +0000 (15:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Oct 2012 17:25:54 +0000 (10:25 -0700)
commit4d04ac9ad359b314a228ae1fe53c4cf92661fa10
tree3cc7be03de3425c212d1f9f5f2d4e0eb5b6c3ab2
parentf8121840c5851ab897ddfc668e4c22b78f21b596
USB: cp210x: fix port-data memory leak

Fix port data memory leak by replacing port private data with serial
private data.

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

The private data is used to store the control interface number, but as
this is the same for all ports on an interface it should be stored as
usb-serial data anyway.

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/cp210x.c