.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /// NULL check before some freeing functions is not needed. |
---|
2 | 3 | /// |
---|
3 | 4 | /// Based on checkpatch warning |
---|
4 | 5 | /// "kfree(NULL) is safe this check is probably not required" |
---|
5 | 6 | /// and kfreeaddr.cocci by Julia Lawall. |
---|
6 | 7 | /// |
---|
7 | | -// Copyright: (C) 2014 Fabian Frederick. GPLv2. |
---|
| 8 | +// Copyright: (C) 2014 Fabian Frederick. |
---|
8 | 9 | // Comments: - |
---|
9 | 10 | // Options: --no-includes --include-headers |
---|
10 | 11 | |
---|
.. | .. |
---|
20 | 21 | ( |
---|
21 | 22 | kfree(E); |
---|
22 | 23 | | |
---|
23 | | - kzfree(E); |
---|
| 24 | + kvfree(E); |
---|
| 25 | +| |
---|
| 26 | + kfree_sensitive(E); |
---|
| 27 | +| |
---|
| 28 | + kvfree_sensitive(E, ...); |
---|
| 29 | +| |
---|
| 30 | + vfree(E); |
---|
24 | 31 | | |
---|
25 | 32 | debugfs_remove(E); |
---|
26 | 33 | | |
---|
.. | .. |
---|
41 | 48 | @@ |
---|
42 | 49 | |
---|
43 | 50 | * if (E != NULL) |
---|
44 | | -* \(kfree@p\|kzfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\| |
---|
| 51 | +* \(kfree@p\|kvfree@p\|kfree_sensitive@p\|kvfree_sensitive@p\|vfree@p\| |
---|
| 52 | +* debugfs_remove@p\|debugfs_remove_recursive@p\| |
---|
45 | 53 | * usb_free_urb@p\|kmem_cache_destroy@p\|mempool_destroy@p\| |
---|
46 | | -* dma_pool_destroy@p\)(E); |
---|
| 54 | +* dma_pool_destroy@p\)(E, ...); |
---|
47 | 55 | |
---|
48 | 56 | @script:python depends on org@ |
---|
49 | 57 | p << r.p; |
---|