Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

coccinelle: ifnullfree: add vfree(), kvfree*() functions

Extend the list of free functions with kvfree(), kvfree_sensitive(),
vfree().

Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

authored by

Denis Efremov and committed by
Julia Lawall
5e0c074e a2fc3718

+9 -2
+9 -2
scripts/coccinelle/free/ifnullfree.cocci
··· 21 21 ( 22 22 kfree(E); 23 23 | 24 + kvfree(E); 25 + | 24 26 kfree_sensitive(E); 27 + | 28 + kvfree_sensitive(E, ...); 29 + | 30 + vfree(E); 25 31 | 26 32 debugfs_remove(E); 27 33 | ··· 48 42 @@ 49 43 50 44 * if (E != NULL) 51 - * \(kfree@p\|kfree_sensitive@p\|debugfs_remove@p\|debugfs_remove_recursive@p\| 45 + * \(kfree@p\|kvfree@p\|kfree_sensitive@p\|kvfree_sensitive@p\|vfree@p\| 46 + * debugfs_remove@p\|debugfs_remove_recursive@p\| 52 47 * usb_free_urb@p\|kmem_cache_destroy@p\|mempool_destroy@p\| 53 - * dma_pool_destroy@p\)(E); 48 + * dma_pool_destroy@p\)(E, ...); 54 49 55 50 @script:python depends on org@ 56 51 p << r.p;