]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - scripts/coccinelle/free/kfree.cocci
Merge tag 'md-3.3-fixes' of git://neil.brown.name/md
[karo-tx-linux.git] / scripts / coccinelle / free / kfree.cocci
index f9f79d9245ee9815ef3e244f791553501e1391b2..d9ae6d89c2f57e9db00a856f461b1f968cf07018 100644 (file)
@@ -5,9 +5,9 @@
 //# SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument
 ///
 // Confidence: Moderate
-// Copyright: (C) 2010 Nicolas Palix, DIKU.  GPLv2.
-// Copyright: (C) 2010 Julia Lawall, DIKU.  GPLv2.
-// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.  GPLv2.
+// Copyright: (C) 2010-2012 Nicolas Palix.  GPLv2.
+// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.  GPLv2.
+// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.  GPLv2.
 // URL: http://coccinelle.lip6.fr/
 // Comments:
 // Options: -no_includes -include_headers
@@ -23,7 +23,7 @@ position p1;
 kfree@p1(E)
 
 @print expression@
-constant char *c;
+constant char [] c;
 expression free.E,E2;
 type T;
 position p;
@@ -36,6 +36,10 @@ identifier f;
  E@p == E2
 |
  E@p != E2
+|
+ E2 == E@p
+|
+ E2 != E@p
 |
  !E@p
 |
@@ -113,5 +117,5 @@ p1 << free.p1;
 p2 << r.p2;
 @@
 
-msg = "reference preceded by free on line %s" % (p1[0].line)
+msg = "ERROR: reference preceded by free on line %s" % (p1[0].line)
 coccilib.report.print_report(p2[0],msg)