linux/drivers/net/wireless/wl1251
Julia Lawall 059c438355 drivers/net/wireless/wl1251: add missing kfree
In each case, the kfree already at the end of the function is also needed
in the error case.

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

// <smpl>
@exists@
local idexpression x;
statement S,S1;
expression E;
identifier fl;
expression *ptr != NULL;
@@

x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...kfree(x)...+> }
     when any
     when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
               when forall
(
 return \(0\|<+...x...+>\|ptr\);
|
* return ...;
)
}
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-10 14:07:10 -04:00
..
acx.c drivers/net/wireless/wl1251: add missing kfree 2011-08-10 14:07:10 -04:00
acx.h wl1251: implement connection quality monitoring 2011-02-03 16:44:42 -05:00
boot.c wl1251: remove unnecessary import 2010-12-22 15:43:26 -05:00
boot.h
cmd.c drivers/net/wireless/wl1251: add missing kfree 2011-08-10 14:07:10 -04:00
cmd.h wl1251: Prepare for idle mode support 2011-04-07 15:34:14 -04:00
debugfs.c
debugfs.h
event.c wl1251: Prepare for idle mode support 2011-04-07 15:34:14 -04:00
event.h
init.c
init.h
io.c
io.h
Kconfig
main.c wl1251: Add support for idle mode 2011-04-07 15:34:14 -04:00
Makefile
ps.c wl1251: Add support for idle mode 2011-04-07 15:34:14 -04:00
ps.h wl1251: Prepare for idle mode support 2011-04-07 15:34:14 -04:00
reg.h
rx.c Fix common misspellings 2011-03-31 11:26:23 -03:00
rx.h
sdio.c net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
spi.c net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
spi.h
tx.c wl1251: fix 4-byte TX buffer alignment 2011-02-03 16:42:44 -05:00
tx.h
wl12xx_80211.h ieee80211: add IEEE80211_COUNTRY_STRING_LEN definition 2011-03-09 16:10:56 -05:00
wl1251.h wl1251: Add support for idle mode 2011-04-07 15:34:14 -04:00