There are more functions in DPDK which have the semantics as free() when passed NULL pointer.
Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- devtools/cocci/nullfree.cocci | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devtools/cocci/nullfree.cocci b/devtools/cocci/nullfree.cocci index 363b6149ac28..e7472188ab6c 100644 --- a/devtools/cocci/nullfree.cocci +++ b/devtools/cocci/nullfree.cocci @@ -10,6 +10,9 @@ expression E; - if (E != NULL) free(E); + free(E); | +- if (E != NULL) rte_acl_free(E); ++ rte_acl_free(E); +| - if (E != NULL) rte_bitmap_free(E); + rte_bitmap_free(E); | @@ -19,6 +22,12 @@ expression E; - if (E != NULL) rte_hash_free(E); + rte_hash_free(E); | +- if (E != NULL) rte_lpm_free(E); ++ rte_lpm_free(E); +| +- if (E != NULL) rte_lpm6_free(E); ++ rte_lpm6_free(E); +| - if (E != NULL) rte_ring_free(E); + rte_ring_free(E); | -- 2.34.1