Skip to content
Commit 1783e60f authored by Julia Lawall's avatar Julia Lawall Committed by Martin Schwidefsky
Browse files

[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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent b57838ea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment