summaryrefslogtreecommitdiff
path: root/drivers/staging/bcm/Macros.h
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-08-08 13:17:58 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-23 15:20:53 -0700
commite5969d55743c49dfca24e165a534cf5f2638e86b (patch)
tree6b56282c04fb166c6ecc32fd3d7cc8b9e7f30e1e /drivers/staging/bcm/Macros.h
parent1dc634772b0daead0e841b9034e88b6c76a05709 (diff)
drivers/staging/bcm/nvm.c: add missing kfree
Buff is only used as a temporary buffer within the function, so it should be freed before leaving the function in an 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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/bcm/Macros.h')
0 files changed, 0 insertions, 0 deletions