net/i40e: fix bitmap free
authorChenmin Sun <chenmin.sun@intel.com>
Tue, 28 Jul 2020 12:50:58 +0000 (20:50 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 29 Jul 2020 22:41:23 +0000 (00:41 +0200)
This patch fixes the coverity warning #361024.
rte_bitmap_free() is not a right way to free a bitmap, replacing
it with rte_free().

Coverity issue: 361024
Fixes: febc61d350bf ("net/i40e: optimize flow director update rate")

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_ethdev.c

index 88f4fe3..11c02b1 100644 (file)
@@ -1872,7 +1872,7 @@ i40e_fdir_memory_cleanup(struct i40e_pf *pf)
        if (fdir_info->hash_table)
                rte_hash_free(fdir_info->hash_table);
        if (fdir_info->fdir_flow_pool.bitmap)
        if (fdir_info->hash_table)
                rte_hash_free(fdir_info->hash_table);
        if (fdir_info->fdir_flow_pool.bitmap)
-               rte_bitmap_free(fdir_info->fdir_flow_pool.bitmap);
+               rte_free(fdir_info->fdir_flow_pool.bitmap);
        if (fdir_info->fdir_flow_pool.pool)
                rte_free(fdir_info->fdir_flow_pool.pool);
        if (fdir_info->fdir_filter_array)
        if (fdir_info->fdir_flow_pool.pool)
                rte_free(fdir_info->fdir_flow_pool.pool);
        if (fdir_info->fdir_filter_array)