coccinelle: api: kfree_sensitive: print memset position

Print memset() call position in addition to the kfree() position to
ease issues identification.

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
This commit is contained in:
Denis Efremov 2020-10-09 15:54:53 +03:00 committed by Julia Lawall
parent 7b36c1398f
commit 28c185a886

View File

@ -85,14 +85,16 @@ type T;
@script:python depends on report@
p << r.p;
m << r.m;
@@
coccilib.report.print_report(p[0],
"WARNING: opportunity for kfree_sensitive/kvfree_sensitive")
msg = "WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line %s)"
coccilib.report.print_report(p[0], msg % (m[0].line))
@script:python depends on org@
p << r.p;
m << r.m;
@@
coccilib.org.print_todo(p[0],
"WARNING: opportunity for kfree_sensitive/kvfree_sensitive")
msg = "WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line %s)"
coccilib.org.print_todo(p[0], msg % (m[0].line))