diff options
author | Julia Lawall <julia@diku.dk> | 2011-08-08 13:18:03 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-10 14:07:10 -0400 |
commit | 059c4383550b158bc1b6d34d8ab085e81cb3d71b (patch) | |
tree | 903a3b657555ae78c576150f054a2e143ea539b6 /drivers/net/wireless/rt2x00 | |
parent | bdc71bc59231f5542af13b5061b9ab124d093050 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
0 files changed, 0 insertions, 0 deletions