android_kernel_xiaomi_sm8350/drivers/s390/char
Julia Lawall 1783e60ff2 [S390] tape_3590.c: introduce missing kfree
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

@r exists@
expression E,E1;
statement S;
position p1,p2,p3;
@@

E =@p1 \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != E = E1
if (E == NULL || ...) S
... when != E = E1
if@p2 (...) {
 ... when != kfree(E)
 }
... when != E = E1
kfree@p3(E);

@forall@
position r.p2;
expression r.E;
int E1 != 0;
@@

* if@p2 (...) {
 ... when != kfree(E)
     when strict
return E1; }

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-06-10 10:03:28 +02:00
..
con3215.c
con3270.c
ctrlchar.c
ctrlchar.h
defkeymap.c
defkeymap.map
fs3270.c
Kconfig
keyboard.c
keyboard.h
Makefile
monreader.c
monwriter.c
raw3270.c
raw3270.h
sclp_cmd.c
sclp_con.c
sclp_config.c
sclp_cpi_sys.c
sclp_cpi_sys.h
sclp_cpi.c
sclp_quiesce.c
sclp_rw.c
sclp_rw.h
sclp_sdias.c
sclp_tty.c
sclp_tty.h
sclp_vt220.c
sclp.c
sclp.h
tape_34xx.c
tape_3590.c
tape_3590.h
tape_block.c
tape_char.c
tape_class.c
tape_class.h
tape_core.c
tape_proc.c
tape_std.c
tape_std.h
tape.h
tty3270.c
tty3270.h
vmcp.c
vmcp.h
vmlogrdr.c
vmur.c
vmur.h
vmwatchdog.c
zcore.c