summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/free/ifnullfree.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccinelle/free/ifnullfree.cocci')
-rw-r--r--scripts/coccinelle/free/ifnullfree.cocci10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/coccinelle/free/ifnullfree.cocci b/scripts/coccinelle/free/ifnullfree.cocci
index d4a072d5b505..52bd235286fa 100644
--- a/scripts/coccinelle/free/ifnullfree.cocci
+++ b/scripts/coccinelle/free/ifnullfree.cocci
@@ -25,6 +25,12 @@ expression E;
debugfs_remove_recursive(E);
|
usb_free_urb(E);
+|
+ kmem_cache_destroy(E);
+|
+ mempool_destroy(E);
+|
+ dma_pool_destroy(E);
)
@r depends on context || report || org @
@@ -33,7 +39,9 @@ position p;
@@
* if (E != NULL)
-* \(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb@p\)(E);
+* \(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|
+* usb_free_urb@p\|kmem_cache_destroy@p\|mempool_destroy@p\|
+* dma_pool_destroy@p\)(E);
@script:python depends on org@
p << r.p;