linux-hardened/drivers/usb/serial
Julia Lawall b0795bbf6d drivers/usb/serial/opticon.c: Release resources on kmalloc failure
Several resources have been allocated before this kmalloc failure, and thus
they should be released in this error handling code, as done in nearby
error handling code.

The semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression urb;
statement S;
position p1,p2;
@@

urb = usb_alloc_urb@p1(...);
... when != urb
if (urb == NULL) S
... when != urb
(
return <+...urb...+>;
|
return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

cocci.print_main("",p1)
cocci.print_secs("",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-13 15:51:08 -07:00
..
aircable.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ark3116.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
belkin_sa.c
belkin_sa.h
bus.c
ch341.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
ChangeLog.history
console.c
cp210x.c USB: cp210x: fix typo, Telegesys should have been Telegesis 2011-05-10 14:14:58 -07:00
cyberjack.c
cypress_m8.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cypress_m8.h
digi_acceleport.c
empeg.c
ezusb.c
ezusb_convert.pl
ftdi_sio.c USB: serial: ftdi_sio: adding support for TavIR STK500 2011-04-29 16:45:22 -07:00
ftdi_sio.h
ftdi_sio_ids.h USB: serial: ftdi_sio: adding support for TavIR STK500 2011-04-29 16:45:22 -07:00
funsoft.c
garmin_gps.c USB: gamin_gps: Fix for data transfer problems in native mode 2011-04-29 17:03:59 -07:00
generic.c
hp4x.c
io_16654.h
io_edgeport.c Fix common misspellings 2011-03-31 11:26:23 -03:00
io_edgeport.h Fix common misspellings 2011-03-31 11:26:23 -03:00
io_ionsp.h
io_tables.h
io_ti.c Fix common misspellings 2011-03-31 11:26:23 -03:00
io_ti.h
io_usbvend.h
ipaq.c
ipw.c
ir-usb.c
iuu_phoenix.c
iuu_phoenix.h
Kconfig Revert "USB: sam-ba: add driver for Atmel SAM Boot Assistant (SAM-BA)" 2011-04-13 16:48:25 -07:00
keyspan.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
keyspan.h
keyspan_pda.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
kl5kusb105.c
kl5kusb105.h
kobil_sct.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
kobil_sct.h
Makefile Revert "USB: sam-ba: add driver for Atmel SAM Boot Assistant (SAM-BA)" 2011-04-13 16:48:25 -07:00
Makefile-keyspan_pda_fw
mct_u232.c usb/serial: fix function args warnings, dropping *filp 2011-04-04 08:35:20 -07:00
mct_u232.h
mos7720.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
mos7840.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
moto_modem.c USB: moto_modem: Add USB identifier for the Motorola VE240. 2011-04-29 16:45:21 -07:00
navman.c
omninet.c
opticon.c drivers/usb/serial/opticon.c: Release resources on kmalloc failure 2011-05-13 15:51:08 -07:00
option.c Bind only modem AT command endpoint to option module. 2011-04-29 17:05:06 -07:00
oti6858.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
oti6858.h
pl2303.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
pl2303.h
qcaux.c
qcserial.c usb: qcserial add missing errorpath kfrees 2011-04-13 15:53:16 -07:00
safe_serial.c
siemens_mpi.c
sierra.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
spcp8x5.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
ssu100.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
symbolserial.c
ti_usb_3410_5052.c Merge 2.6.38-rc6 into tty-next 2011-02-24 11:36:31 -08:00
ti_usb_3410_5052.h
usb-serial.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
usb-wwan.h tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
usb_debug.c
usb_wwan.c usb: wwan: fix compilation without CONFIG_PM_RUNTIME 2011-03-23 13:16:06 -07:00
visor.c
visor.h
vivopay-serial.c
whiteheat.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
whiteheat.h
zio.c