summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/free/devm_free.cocci
diff options
context:
space:
mode:
authorYann Droneaud <ydroneaud@opteya.com>2016-05-23 17:07:19 +0200
committerMichal Marek <mmarek@suse.com>2016-06-21 11:43:32 +0200
commit6dd9379e8f327e70d182b15be3ba21aa2b5d2cba (patch)
tree0e8d95f8e1748444490f8be79ba1b2dd7bde6553 /scripts/coccinelle/free/devm_free.cocci
parent7a2358b3818691521c7df531415d1ea4d0398520 (diff)
downloadlinux-6dd9379e8f327e70d182b15be3ba21aa2b5d2cba.tar.bz2
coccinelle: also catch kzfree() issues
Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), kfree() is no more the only function to be considered: kzfree() should be recognized too. In particular, kzfree() must not be called on memory allocated through devm_*() functions. Cc: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/coccinelle/free/devm_free.cocci')
-rw-r--r--scripts/coccinelle/free/devm_free.cocci2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle/free/devm_free.cocci
index 3d9349012bb3..83c03adec1c5 100644
--- a/scripts/coccinelle/free/devm_free.cocci
+++ b/scripts/coccinelle/free/devm_free.cocci
@@ -48,6 +48,8 @@ position p;
(
* kfree@p(x)
|
+* kzfree@p(x)
+|
* free_irq@p(x)
|
* iounmap@p(x)