linux/drivers/net/wireless
Julia Lawall 9f9857bb5e drivers/net/wireless: introduce missing kfree
Error handling code following a kzalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

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

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-03 16:31:23 -04:00
..
ath ath9k: Read outside array bounds 2009-07-27 15:19:36 -04:00
b43 b43: Add support for 4318E 2009-07-08 15:24:24 -04:00
b43legacy b43/b43legacy: fix radio LED initialization 2009-07-07 12:55:26 -04:00
hostap Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
ipw2x00 net: use symbolic values for ndo_start_xmit() return codes 2009-06-13 01:18:50 -07:00
iwlwifi drivers/net/wireless/iwlwifi: introduce missing kfree 2009-08-03 16:31:22 -04:00
iwmc3200wifi drivers/net/wireless: introduce missing kfree 2009-08-03 16:31:23 -04:00
libertas libertas: Read buffer overflow 2009-07-29 14:52:01 -04:00
libertas_tf mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
orinoco netdev: restore MAC address set and validate operations 2009-07-12 14:20:02 -07:00
p54 p54spi: fix potential null deref in p54spi.c 2009-07-21 15:59:48 -04:00
prism54 net: fix network drivers ndo_start_xmit() return values (part 3) 2009-06-13 01:18:37 -07:00
rt2x00 rt2x00: Fix chipset detection for rt2500usb 2009-07-21 12:07:43 -04:00
rtl818x rtl8187: Fix for kernel oops when unloading with LEDs enabled 2009-07-21 12:07:42 -04:00
wl12xx wireless: WL12XX should depend on GENERIC_HARDIRQS 2009-05-11 15:23:54 -04:00
zd1211rw zd1211rw: fix unaligned access in zd_mac_rx 2009-08-03 16:31:22 -04:00
adm8211.c mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
adm8211.h
airo_cs.c
airo.c airo: Buffer overflow 2009-07-27 15:19:36 -04:00
airo.h
arlan-main.c net: use symbolic values for ndo_start_xmit() return codes 2009-06-13 01:18:50 -07:00
arlan-proc.c
arlan.h
at76c50x-usb.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-06-03 02:43:41 -07:00
at76c50x-usb.h
atmel_cs.c Wireless: remove driver_data direct access of struct device 2009-05-06 15:15:01 -04:00
atmel_pci.c
atmel.c net: use symbolic values for ndo_start_xmit() return codes 2009-06-13 01:18:50 -07:00
atmel.h
i82586.h
i82593.h
Kconfig Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
mac80211_hwsim.c mac80211_hwsim: fix use after free 2009-07-21 12:07:40 -04:00
Makefile iwmc3200wifi: Add new Intel Wireless Multicomm 802.11 driver 2009-05-22 14:06:02 -04:00
mwl8k.c mac80211: move HT operation mode BSS info 2009-05-11 15:23:57 -04:00
netwave_cs.c
ray_cs.c net: use symbolic values for ndo_start_xmit() return codes 2009-06-13 01:18:50 -07:00
ray_cs.h
rayctl.h
rndis_wlan.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
strip.c Revert "NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines." 2009-07-14 13:13:41 -07:00
wavelan_cs.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
wavelan_cs.h
wavelan_cs.p.h
wavelan.c net: use symbolic values for ndo_start_xmit() return codes 2009-06-13 01:18:50 -07:00
wavelan.h
wavelan.p.h wireless: convert wavelan to net_device_ops 2009-03-27 00:46:46 -07:00
wl3501_cs.c net: fix network drivers ndo_start_xmit() return values (part 3) 2009-06-13 01:18:37 -07:00
wl3501.h
zd1201.c net: fix network drivers ndo_start_xmit() return values (part 3) 2009-06-13 01:18:37 -07:00
zd1201.h