diff options
author | Julia Lawall <julia@diku.dk> | 2011-08-12 13:31:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-12 13:33:31 -0400 |
commit | f8afdf481f0fef5e170c6c928cec42879d505654 (patch) | |
tree | d5731d783f50c21f5fd0bbff19dc80995589b698 /drivers/net/eexpress.h | |
parent | 674db1344443204b6ce3293f2df8fd1b7665deea (diff) | |
download | linux-f8afdf481f0fef5e170c6c928cec42879d505654.tar.bz2 |
drivers/net/wireless/wl12xx: add missing kfree
In each case, the freed data should be freed in the error handling code
as
well.
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>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/eexpress.h')
0 files changed, 0 insertions, 0 deletions