summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-08-24 17:15:10 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-08-24 17:15:23 +0200
commitba465d830ed1703713251917f154688ec537580f (patch)
tree972fd00c8b2c72f320887c9910ba46f1d12314f7 /drivers/of
parent27e7318c3e47e4fac71fcb472623434063ccc7a5 (diff)
[S390] drivers/s390/block/dasd_ioctl.c: add missing kfree
Data is only used to temporarily hold information to be copied to the user level, so it should be freed before leaving the function. 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: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/of')
0 files changed, 0 insertions, 0 deletions