original_kernel/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
..
Kconfig
Makefile
asix.h
asix_common.c
asix_devices.c
ax88172a.c
catc.c
cdc-phonet.c cdc-phonet: Don't leak in usbpn_open 2012-08-08 16:04:47 -07:00
cdc_eem.c
cdc_ether.c
cdc_ncm.c
cdc_subset.c
cx82310_eth.c
dm9601.c
gl620a.c
hso.c
int51x1.c
ipheth.c
kalmia.c
kaweth.c
lg-vl600.c
mcs7830.c
net1080.c
pegasus.c
pegasus.h
plusb.c
qmi_wwan.c
rndis_host.c
rtl8150.c
sierra_net.c
smsc75xx.c
smsc75xx.h
smsc95xx.c
smsc95xx.h
usbnet.c
zaurus.c