1
linux/drivers/net/usb
Jesper Juhl 47dffc7547 cdc-phonet: Don't leak in usbpn_open
We allocate memory for 'req' with usb_alloc_urb() and then test
'if (!req || rx_submit(pnd, req, GFP_KERNEL | __GFP_COLD))'.
If we enter that branch due to '!req' then there is no problem. But if
we enter the branch due to 'req' being != 0 and the 'rx_submit()' call
being false, then we'll leak the memory we allocated.
Deal with the leak by always calling 'usb_free_urb(req)' when entering
the branch. If 'req' happens to be 0 then the call is harmless, if it
is not 0 then we free the memory we allocated but don't need.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-08 16:04:47 -07:00
..
asix_common.c asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
asix_devices.c asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
asix.h asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
ax88172a.c asix: Add support for programming the EEPROM 2012-07-19 10:48:07 -07:00
catc.c
cdc_eem.c
cdc_ether.c
cdc_ncm.c cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN 2012-08-03 20:32:30 -07:00
cdc_subset.c
cdc-phonet.c cdc-phonet: Don't leak in usbpn_open 2012-08-08 16:04:47 -07:00
cx82310_eth.c
dm9601.c
gl620a.c
hso.c
int51x1.c
ipheth.c
kalmia.c
kaweth.c USB: kaweth.c: use GFP_ATOMIC under spin_lock 2012-07-27 13:45:50 -07:00
Kconfig asix: AX88172A driver depends on phylib 2012-07-19 10:48:07 -07:00
lg-vl600.c
Makefile asix: Add a new driver for the AX88172A 2012-07-16 23:26:23 -07:00
mcs7830.c
net1080.c
pegasus.c
pegasus.h
plusb.c
qmi_wwan.c net: qmi_wwan: add ZTE MF821D 2012-07-18 09:40:53 -07:00
rndis_host.c
rtl8150.c
sierra_net.c
smsc75xx.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
smsc75xx.h
smsc95xx.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-07-24 13:34:56 -07:00
smsc95xx.h
usbnet.c net: usb: Use eth_random_addr 2012-07-16 22:38:28 -07:00
zaurus.c