[PATCH v1 03/12] net/ice/base: fix memory leak in HW profile handling

Anatoly Burakov anatoly.burakov at intel.com
Tue Sep 2 19:26:53 CEST 2025


From: Jacob Keller <jacob.e.keller at intel.com>

The ice_flow_set_hw_prof() function allocates a params structure with
ice_malloc. It uses this structure to hold some data temporarily while
processing the hardware profile to set.

Static analysis indicated that this memory is not released. Fix this
function to free the memory upon exit.

Fixes: 8ebb93942b2c ("net/ice/base: add function to set HW profile for raw flow")
Cc: stable at dpdk.org

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 drivers/net/intel/ice/base/ice_flow.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/intel/ice/base/ice_flow.c b/drivers/net/intel/ice/base/ice_flow.c
index cdc9ee26c5..7b0ecd54df 100644
--- a/drivers/net/intel/ice/base/ice_flow.c
+++ b/drivers/net/intel/ice/base/ice_flow.c
@@ -2632,10 +2632,6 @@ ice_flow_set_hw_prof(struct ice_hw *hw, u16 dest_vsi_handle,
 
 	status = ice_flow_assoc_hw_prof(hw, blk, dest_vsi_handle,
 					fdir_vsi_handle, id);
-	if (status)
-		goto free_params;
-
-	return 0;
 
 free_params:
 	ice_free(hw, params);
-- 
2.47.3



More information about the dev mailing list