acrn-kernel/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
..
Kconfig
Makefile
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
dasd_eckd.c [S390] dasd: check if raw track access is supported 2011-08-03 16:44:19 +02:00
dasd_eckd.h
dasd_eer.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
dasd_erp.c
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
xpram.c [S390] xpram: remove __initdata attribute from module parameters 2011-03-03 17:56:14 +01:00