linux/drivers/net/irda
Julia Lawall 8d34e7d6f3 drivers/net/irda: Eliminate memory leak
dev_alloc_skb allocates some memory, so that memory should be freed before
leaving the function in an error case.

Corrected some typos in a nearby comment as well.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression x;
expression E;
identifier f1;
iterator I;
@@

x = dev_alloc_skb(...);
<... when != x
     when != true (x == NULL || ...)
     when != if (...) { <+...x...+> }
     when != I (...) { <+...x...+> }
(
 x == NULL
|
 x == E
|
 x->f1
)
...>
* return ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-25 16:36:49 -07:00
..
Kconfig net/irda: Add SuperH IrDA driver support 2010-04-06 19:50:21 -07:00
Makefile net/irda: Add SuperH IrDA driver support 2010-04-06 19:50:21 -07:00
act200l-sir.c
actisys-sir.c
ali-ircc.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-04-11 14:53:53 -07:00
ali-ircc.h
au1k_ir.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
au1000_ircc.h
bfin_sir.c net/irda: bfin_sir: IRDA is not affected by anomaly 05000230 2010-05-23 23:57:45 -07:00
bfin_sir.h include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
donauboe.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
donauboe.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
ep7211-sir.c
esi-sir.c
girbil-sir.c
irda-usb.c net/irda: remove trailing space in messages 2010-03-24 14:01:55 -07:00
irda-usb.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
irtty-sir.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
irtty-sir.h
kingsun-sir.c headers: kref.h redux 2009-09-26 10:17:19 -07:00
ks959-sir.c drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
ksdazzle-sir.c drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
litelink-sir.c
ma600-sir.c
mcp2120-sir.c
mcs7780.c drivers/net/irda: Adjust confusing if indentation 2010-08-16 21:06:26 -07:00
mcs7780.h irda: convert to netdev_tx_t 2009-09-01 01:13:38 -07:00
nsc-ircc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nsc-ircc.h
old_belkin-sir.c
pxaficp_ir.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
sa1100_ir.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
sh_irda.c Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into devel-stable 2010-08-06 18:13:19 +01:00
sh_sir.c drivers: irda: fix sign bug 2010-07-15 20:27:57 -07:00
sir-dev.h
sir_dev.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
sir_dongle.c
smsc-ircc2.c drivers/net/irda: use for_each_pci_dev() 2010-07-21 14:44:28 -07:00
smsc-ircc2.h
smsc-sio.h
stir4200.c drivers/net: Move && and || to end of previous line 2009-12-03 13:18:01 -08:00
tekram-sir.c
toim3232-sir.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
via-ircc.c drivers/net/irda: Eliminate memory leak 2010-08-25 16:36:49 -07:00
via-ircc.h drivers/net: remove useless semicolons 2010-05-17 22:47:34 -07:00
vlsi_ir.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
vlsi_ir.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
w83977af.h
w83977af_ir.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
w83977af_ir.h