linux/drivers/s390/block
Julia Lawall ba465d830e [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>
2011-08-24 17:15:23 +02:00
..
dasd.c [S390] dasd: use vmalloc for statistics input buffer 2011-08-03 16:44:19 +02:00
dasd_3990_erp.c Fix common misspellings 2011-03-31 11:26:23 -03:00
dasd_alias.c [S390] get rid of unused variables 2011-05-23 10:24:28 +02:00
dasd_devmap.c [S390] dasd: fix race between open and offline 2011-04-20 10:15:43 +02:00
dasd_diag.c [S390] irq: merge irq.c and s390_ext.c 2011-05-26 09:48:24 +02:00
dasd_diag.h [S390] cleanup lowcore access from external interrupts 2010-10-25 16:10:19 +02:00
dasd_eckd.c [S390] dasd: check if raw track access is supported 2011-08-03 16:44:19 +02:00
dasd_eckd.h [S390] dasd: Add support for raw ECKD access. 2011-01-05 12:47:30 +01:00
dasd_eer.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
dasd_erp.c [S390] dasd: do path verification for paths added at runtime 2011-01-05 12:47:30 +01:00
dasd_fba.c [S390] ccw_driver: remove duplicate members 2011-03-23 10:15:59 +01:00
dasd_fba.h
dasd_genhd.c [S390] dasd: fix race between open and offline 2011-04-20 10:15:43 +02:00
dasd_int.h [S390] dasd: add enhanced DASD statistics interface 2011-07-24 10:48:23 +02:00
dasd_ioctl.c [S390] drivers/s390/block/dasd_ioctl.c: add missing kfree 2011-08-24 17:15:23 +02:00
dasd_proc.c [S390] dasd: use vmalloc for statistics input buffer 2011-08-03 16:44:19 +02:00
dcssblk.c s390/block: kill the big kernel lock 2010-09-26 16:25:51 +02:00
Kconfig [S390] cleanup s390 Kconfig 2011-01-05 12:47:23 +01:00
Makefile [S390] dasd: add hyper PAV support to DASD device driver, part 1 2008-01-26 14:11:28 +01:00
xpram.c [S390] xpram: remove __initdata attribute from module parameters 2011-03-03 17:56:14 +01:00