linux/drivers/usb/serial
Johan Hovold b8f0e82044 USB: usb-wwan: fix multiple memory leaks in error paths
Fix port-data memory leak in usb-serial probe error path by moving port
data allocation to port_probe.

Since commit a1028f0abf ("usb: usb_wwan: replace release and disconnect
with a port_remove hook") port data is deallocated in port_remove. This
leaves a possibility for memory leaks if usb-serial probe fails after
attach but before the port in question has been successfully registered.

Note that this patch also fixes two additional memory leaks in the error
path of attach should port initialisation fail for any port as the urbs
were never freed and neither was the data of any of the successfully
initialised ports.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25 09:37:13 -07:00
..
aircable.c USB: serial: aircable.c: remove debug module parameter 2012-09-14 12:31:18 -07:00
ark3116.c USB: ark3116: fix NULL-pointer dereference 2012-10-16 10:25:54 -07:00
belkin_sa.c USB: belkin_sa: fix port-data memory leak 2012-10-16 10:25:54 -07:00
belkin_sa.h
bus.c usb: serial: prevent suspend/resume from racing against probe/remove 2012-08-10 11:51:43 -07:00
ch341.c USB: ch341: fix port-data memory leak 2012-10-25 09:36:57 -07:00
console.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
cp210x.c USB: cp210x: fix port-data memory leak 2012-10-16 10:25:54 -07:00
cyberjack.c USB: cyberjack: fix port-data memory leak 2012-10-16 10:25:54 -07:00
cypress_m8.c USB: cypress_m8: fix port-data memory leak 2012-10-17 13:47:57 -07:00
cypress_m8.h
digi_acceleport.c USB: digi_acceleport: fix port-data memory leak 2012-10-25 09:36:57 -07:00
empeg.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
ezusb_convert.pl
f81232.c USB: f81232: fix port-data memory leak 2012-10-17 13:47:58 -07:00
ftdi_sio_ids.h USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support 2012-09-24 13:42:42 -07:00
ftdi_sio.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
ftdi_sio.h
funsoft.c USB: serial: funsoft.c: remove debug module parameter 2012-09-14 12:31:27 -07:00
garmin_gps.c USB: fix port probing and removal in garmin_gps 2012-10-16 10:25:55 -07:00
generic.c USB: Serial: usb-serial: remove debug module parameter 2012-09-18 16:05:17 +01:00
hp4x.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
io_16654.h
io_edgeport.c USB: io_edgeport: fix port-data memory leak 2012-10-17 13:47:58 -07:00
io_edgeport.h
io_ionsp.h
io_tables.h USB: io_edgeport: fix port-data memory leak 2012-10-17 13:47:58 -07:00
io_ti.c USB: io_ti: fix sysfs-attribute creation 2012-10-18 08:08:47 -07:00
io_ti.h
io_usbvend.h
ipaq.c USB: serial: ipaq.c: remove debug module parameter 2012-09-14 12:31:30 -07:00
ipw.c USB: usb-wwan: fix multiple memory leaks in error paths 2012-10-25 09:37:13 -07:00
ir-usb.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
iuu_phoenix.c USB: iuu_phoenix: fix sysfs-attribute creation 2012-10-18 08:08:47 -07:00
iuu_phoenix.h
Kconfig USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc 2012-09-26 14:20:28 -07:00
keyspan_pda.c USB: keyspan_pda: fix port-data memory leak 2012-10-17 13:47:58 -07:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
keyspan.c USB: keyspan: fix NULL-pointer dereferences and memory leaks 2012-10-25 09:37:13 -07:00
keyspan.h USB: keyspan: fix NULL-pointer dereferences and memory leaks 2012-10-25 09:37:13 -07:00
kl5kusb105.c USB: kl5kusb105: fix port-data memory leak 2012-10-17 13:47:59 -07:00
kl5kusb105.h
kobil_sct.c USB: kobil_sct: fix port-data memory leak 2012-10-17 13:47:58 -07:00
kobil_sct.h
Makefile USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc 2012-09-26 14:20:28 -07:00
Makefile-keyspan_pda_fw
mct_u232.c USB: mct_u232: fix broken close 2012-10-25 09:37:09 -07:00
mct_u232.h
metro-usb.c USB: metro-usb: fix io after disconnect 2012-10-25 09:36:57 -07:00
mos7720.c USB: mos7720: fix port-data memory leak 2012-10-25 09:36:58 -07:00
mos7840.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
moto_modem.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
navman.c USB: Serial: navman.c: remove debug module parameter 2012-09-18 10:16:01 +01:00
omninet.c USB: omninet: fix port-data memory leak 2012-10-25 09:36:58 -07:00
opticon.c USB: opticon: fix memory leak in error path 2012-10-25 09:36:59 -07:00
option.c USB: usb-wwan: fix multiple memory leaks in error paths 2012-10-25 09:37:13 -07:00
oti6858.c USB: oti6858: fix port-data memory leak 2012-10-17 13:47:59 -07:00
oti6858.h
pl2303.c USB: pl2303: fix port-data memory leak 2012-10-16 10:25:54 -07:00
pl2303.h
qcaux.c USB: qcaux: add Pantech vendor class match 2012-09-21 09:42:02 -07:00
qcserial.c USB: usb-wwan: fix multiple memory leaks in error paths 2012-10-25 09:37:13 -07:00
quatech2.c USB: quatech2: fix io after disconnect 2012-10-25 09:36:58 -07:00
safe_serial.c USB: serial: safe-serial: fix up printk() usage 2012-09-18 17:07:24 +01:00
siemens_mpi.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
sierra.c USB: serial: Fix memory leak in sierra_release() 2012-10-24 11:45:34 -07:00
spcp8x5.c USB: spcp8x5: fix port-data memory leak 2012-10-17 13:48:00 -07:00
ssu100.c USB: ssu100: fix port-data memory leak 2012-10-17 13:47:59 -07:00
symbolserial.c USB: Serial: symbolserial.c: remove debug module parameter 2012-09-18 10:16:20 +01:00
ti_usb_3410_5052.c USB: ti_usb_3410_5052: fix port-data memory leak 2012-10-17 13:47:59 -07:00
ti_usb_3410_5052.h USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial console 2012-05-11 15:14:07 -07:00
usb_debug.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
usb_wwan.c USB: usb-wwan: fix multiple memory leaks in error paths 2012-10-25 09:37:13 -07:00
usb-serial.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
usb-wwan.h USB: usb-wwan: fix multiple memory leaks in error paths 2012-10-25 09:37:13 -07:00
visor.c USB: Serial: visor.c: remove debug module parameter 2012-09-18 10:16:28 +01:00
visor.h
vivopay-serial.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
whiteheat.c USB: whiteheat: fix port-data memory leak 2012-10-25 09:36:57 -07:00
whiteheat.h
zio.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
zte_ev.c USB: serial: add zte_ev.c driver 2012-09-13 10:15:14 -07:00