Skip to contentSkip to conversation

net/i40e: fix a wrong bitmap free call

PATCH Applied [email protected] 2 participants 2 messages Jul 28, 2020 – Jul 29, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/i40e: fix a wrong bitmap free call

From: Chenmin Sun <[email protected]>

This patch fixes the coverity warning #361024. rte_bitmap_free() is not a right way to free a bitmap, replacing it with rte_free().

---
 drivers/net/i40e/i40e_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev.c +1 -1
index 05d5f2861..a17bc9bab 100644
@@ -1870,7 +1870,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)
-		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)
Signature · 1 line
2.17.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Sun, Chenmin <[email protected]>
Sent: Tuesday, July 28, 2020 8:51 PM
To: Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Sun, Chenmin <[email protected]>
Subject: [PATCH] net/i40e: fix a wrong bitmap free call

Quoted 6 lines

From: Chenmin Sun <[email protected]>

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")
Quoted 1 line

Applied to dpdk-next-net-intel.

Thanks
Qi

Quoted 19 lines
---
 drivers/net/i40e/i40e_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/i40e_ethdev.c +1 -2
index 05d5f2861..a17bc9bab 100644
@@ -1870,7 +1870,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)
-		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)
--

2.17.1