7f904d7e1f
Based on 1 normalized pattern(s): gplv2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 58 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081207.556988620@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38 lines
616 B
Plaintext
38 lines
616 B
Plaintext
// SPDX-License-Identifier: GPL-2.0-only
|
|
/// Free of a structure field
|
|
///
|
|
// Confidence: High
|
|
// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6.
|
|
// URL: http://coccinelle.lip6.fr/
|
|
// Comments:
|
|
// Options: --no-includes --include-headers
|
|
|
|
virtual org
|
|
virtual report
|
|
virtual context
|
|
|
|
@r depends on context || report || org @
|
|
expression e;
|
|
identifier f;
|
|
position p;
|
|
@@
|
|
|
|
(
|
|
* kfree@p(&e->f)
|
|
|
|
|
* kzfree@p(&e->f)
|
|
)
|
|
|
|
@script:python depends on org@
|
|
p << r.p;
|
|
@@
|
|
|
|
cocci.print_main("kfree",p)
|
|
|
|
@script:python depends on report@
|
|
p << r.p;
|
|
@@
|
|
|
|
msg = "ERROR: invalid free of structure field"
|
|
coccilib.report.print_report(p[0],msg)
|